wip
This commit is contained in:
parent
ec3ae7f6de
commit
6671f11a91
@ -14,9 +14,6 @@ class Proxy extends Component
|
|||||||
public Server $server;
|
public Server $server;
|
||||||
|
|
||||||
public ProxyTypes $selectedProxy = ProxyTypes::TRAEFIK_V2;
|
public ProxyTypes $selectedProxy = ProxyTypes::TRAEFIK_V2;
|
||||||
public $is_proxy_installed;
|
|
||||||
|
|
||||||
public $is_check_proxy_complete = false;
|
|
||||||
public $proxy_settings = null;
|
public $proxy_settings = null;
|
||||||
|
|
||||||
public function installProxy()
|
public function installProxy()
|
||||||
@ -64,7 +61,6 @@ public function checkProxySettingsInSync()
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server);
|
$this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server);
|
||||||
$this->is_check_proxy_complete = true;
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return generalErrorHandler($e);
|
return generalErrorHandler($e);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ version: '3.8'
|
|||||||
|
|
||||||
x-testing-host:
|
x-testing-host:
|
||||||
&testing-host-base
|
&testing-host-base
|
||||||
image: coolify-testing-host
|
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: ./docker/testing-host
|
context: ./docker/testing-host
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
# https://download.docker.com/linux/static/stable/
|
# 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
|
# 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.17.3
|
||||||
ARG DOCKER_COMPOSE_VERSION=2.6.1
|
# https://github.com/docker/buildx/releases
|
||||||
|
ARG DOCKER_BUILDX_VERSION=0.10.4
|
||||||
# https://github.com/buildpacks/pack/releases
|
# 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 DEBIAN_FRONTEND noninteractive
|
||||||
ENV TZ=UTC
|
ENV TZ=UTC
|
||||||
@ -26,13 +28,14 @@ RUN apt-get update \
|
|||||||
RUN ssh-keygen -A
|
RUN ssh-keygen -A
|
||||||
RUN mkdir -p /run/sshd
|
RUN mkdir -p /run/sshd
|
||||||
|
|
||||||
# Install Docker CLI, Docker Compose, and Pack
|
RUN if [[ ${TARGETPLATFORM} == 'linux/amd64' ]]; then \
|
||||||
RUN mkdir -p ~/.docker/cli-plugins
|
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 && \
|
||||||
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-$DOCKER_VERSION -o /usr/bin/docker
|
curl -sSL https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose && \
|
||||||
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-$DOCKER_COMPOSE_VERSION -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) && \
|
||||||
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/pack-$PACK_VERSION -o /usr/local/bin/pack
|
(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) && \
|
||||||
RUN curl -sSL https://nixpacks.com/install.sh | bash
|
curl -sSL https://nixpacks.com/install.sh | bash && \
|
||||||
RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker /usr/local/bin/pack
|
chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker /usr/local/bin/pack /root/.docker/cli-plugins/docker-buildx \
|
||||||
|
;fi
|
||||||
RUN groupadd docker
|
RUN groupadd docker
|
||||||
|
|
||||||
# Setup coolify user
|
# Setup coolify user
|
||||||
|
@ -42,6 +42,9 @@ h1 {
|
|||||||
h2 {
|
h2 {
|
||||||
@apply text-xl font-bold py-4;
|
@apply text-xl font-bold py-4;
|
||||||
}
|
}
|
||||||
|
h3 {
|
||||||
|
@apply text-lg font-bold py-4;
|
||||||
|
}
|
||||||
.box {
|
.box {
|
||||||
@apply flex items-center justify-center text-sm rounded cursor-pointer h-14 bg-coolgray-200 hover:bg-coollabs p-2;
|
@apply flex items-center justify-center text-sm rounded cursor-pointer h-14 bg-coolgray-200 hover:bg-coollabs p-2;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<h2>Proxy</h2>
|
|
||||||
<div>{{ $this->server->extra_attributes->proxy_status }}</div>
|
|
||||||
</div>
|
|
||||||
@if ($this->server->extra_attributes->proxy_status !== 'running')
|
@if ($this->server->extra_attributes->proxy_status !== 'running')
|
||||||
<select wire:model="selectedProxy">
|
<select wire:model="selectedProxy">
|
||||||
<option value="{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}">
|
<option value="{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}">
|
||||||
@ -32,8 +29,8 @@
|
|||||||
<livewire:activity-monitor />
|
<livewire:activity-monitor />
|
||||||
</div>
|
</div>
|
||||||
<template x-if="showConfiguration">
|
<template x-if="showConfiguration">
|
||||||
<div x-init="$wire.checkProxySettingsInSync" class="pt-4">
|
<div x-init="$wire.checkProxySettingsInSync">
|
||||||
<h1>Proxy Configuration</h1>
|
<h3>Configuration</h3>
|
||||||
<div wire:loading wire:target="checkProxySettingsInSync">
|
<div wire:loading wire:target="checkProxySettingsInSync">
|
||||||
<x-proxy.loading />
|
<x-proxy.loading />
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,6 +20,15 @@
|
|||||||
@else
|
@else
|
||||||
<p>No destinations found</p>
|
<p>No destinations found</p>
|
||||||
@endif
|
@endif
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<h2>Proxy</h2>
|
||||||
|
@if ($server->settings->is_validated)
|
||||||
|
<div>{{ $server->extra_attributes->proxy_status }}</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@if ($server->settings->is_validated)
|
||||||
<livewire:server.proxy :server="$server" />
|
<livewire:server.proxy :server="$server" />
|
||||||
|
@else
|
||||||
|
<p>Server is not validated. Validate first.</p>
|
||||||
|
@endif
|
||||||
</x-layout>
|
</x-layout>
|
||||||
|
Loading…
Reference in New Issue
Block a user