From 6671f11a91a8c454e93dd4963ea7c2f9ba3b867f Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 15 May 2023 14:21:30 +0200 Subject: [PATCH] wip --- app/Http/Livewire/Server/Proxy.php | 4 --- docker-compose.dev.yml | 1 - docker/testing-host/Dockerfile | 29 ++++++++++--------- resources/css/app.css | 3 ++ .../views/livewire/server/proxy.blade.php | 9 ++---- resources/views/server/show.blade.php | 13 +++++++-- 6 files changed, 33 insertions(+), 26 deletions(-) diff --git a/app/Http/Livewire/Server/Proxy.php b/app/Http/Livewire/Server/Proxy.php index ada0a6457..1991b75e9 100644 --- a/app/Http/Livewire/Server/Proxy.php +++ b/app/Http/Livewire/Server/Proxy.php @@ -14,9 +14,6 @@ class Proxy extends Component public Server $server; public ProxyTypes $selectedProxy = ProxyTypes::TRAEFIK_V2; - public $is_proxy_installed; - - public $is_check_proxy_complete = false; public $proxy_settings = null; public function installProxy() @@ -64,7 +61,6 @@ class Proxy extends Component { try { $this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server); - $this->is_check_proxy_complete = true; } catch (\Exception $e) { return generalErrorHandler($e); } diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index bcea84941..9cd655181 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -2,7 +2,6 @@ version: '3.8' x-testing-host: &testing-host-base - image: coolify-testing-host build: dockerfile: Dockerfile context: ./docker/testing-host diff --git a/docker/testing-host/Dockerfile b/docker/testing-host/Dockerfile index 8125614f0..1e8628d87 100644 --- a/docker/testing-host/Dockerfile +++ b/docker/testing-host/Dockerfile @@ -1,14 +1,16 @@ FROM ubuntu:22.04 ARG TARGETPLATFORM - # https://download.docker.com/linux/static/stable/ -ARG DOCKER_VERSION=20.10.18 +ARG DOCKER_VERSION=23.0.5 # https://github.com/docker/compose/releases -# Reverted to 2.6.1 because of this https://github.com/docker/compose/issues/9704. 2.9.0 still has a bug. -ARG DOCKER_COMPOSE_VERSION=2.6.1 +ARG DOCKER_COMPOSE_VERSION=2.17.3 +# https://github.com/docker/buildx/releases +ARG DOCKER_BUILDX_VERSION=0.10.4 # https://github.com/buildpacks/pack/releases -ARG PACK_VERSION=v0.27.0 +ARG PACK_VERSION=0.29.0 +# https://github.com/railwayapp/nixpacks/releases +ARG NIXPACKS_VERSION=1.6.1 ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC @@ -17,7 +19,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update \ && apt-get install -y gnupg gosu curl ca-certificates zip unzip git git-lfs supervisor \ - sqlite3 libcap2-bin libpng-dev python2 dnsutils openssh-server sudo \ + sqlite3 libcap2-bin libpng-dev python2 dnsutils openssh-server sudo \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* @@ -26,13 +28,14 @@ RUN apt-get update \ RUN ssh-keygen -A RUN mkdir -p /run/sshd -# Install Docker CLI, Docker Compose, and Pack -RUN mkdir -p ~/.docker/cli-plugins -RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-$DOCKER_VERSION -o /usr/bin/docker -RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-$DOCKER_COMPOSE_VERSION -o ~/.docker/cli-plugins/docker-compose -RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/pack-$PACK_VERSION -o /usr/local/bin/pack -RUN curl -sSL https://nixpacks.com/install.sh | bash -RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker /usr/local/bin/pack +RUN if [[ ${TARGETPLATFORM} == 'linux/amd64' ]]; then \ + curl -sSL https://github.com/docker/buildx/releases/download/v${DOCKER_BUILDX_VERSION}/buildx-v${DOCKER_BUILDX_VERSION}.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx && \ + curl -sSL https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose && \ + (curl -sSL https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | tar -C /usr/bin/ --no-same-owner -xzv --strip-components=1 docker/docker) && \ + (curl -sSL https://github.com/buildpacks/pack/releases/download/v${PACK_VERSION}/pack-v${PACK_VERSION}-linux.tgz | tar -C /usr/local/bin/ --no-same-owner -xzv pack) && \ + curl -sSL https://nixpacks.com/install.sh | bash && \ + chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker /usr/local/bin/pack /root/.docker/cli-plugins/docker-buildx \ + ;fi RUN groupadd docker # Setup coolify user diff --git a/resources/css/app.css b/resources/css/app.css index 19dd8f947..4e1e62904 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -42,6 +42,9 @@ h1 { h2 { @apply text-xl font-bold py-4; } +h3 { + @apply text-lg font-bold py-4; +} .box { @apply flex items-center justify-center text-sm rounded cursor-pointer h-14 bg-coolgray-200 hover:bg-coollabs p-2; } diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.php index ec216d2a4..ca3b1629a 100644 --- a/resources/views/livewire/server/proxy.blade.php +++ b/resources/views/livewire/server/proxy.blade.php @@ -1,8 +1,5 @@
-
-

Proxy

-
{{ $this->server->extra_attributes->proxy_status }}
-
+ @if ($this->server->extra_attributes->proxy_status !== 'running')