From 343b5250c127016103a6f0527eaeafbe6981a09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Brabant?= Date: Mon, 16 Oct 2023 10:50:54 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20Add=20CLOUD=5FAPP=5FDOM?= =?UTF-8?q?AIN=20host=20for=20cloud=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 23 ++++++++++++----------- cloud-proxy/Caddyfile | 6 +++++- docker-compose.cloud.yml | 3 ++- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index cdbb21a..c484c7f 100644 --- a/.env.example +++ b/.env.example @@ -49,6 +49,16 @@ MEMBERS_DEMO_OAUTH_GOOGLE_CLIENT_SECRET= # require('crypto').randomBytes(32).toString('hex') AES_ENCRYPTION_KEY= +# ---------------------- +# - Common configuration +# ---------------------- + +# We use a telemetry service to improve the product. +# You can disable it by setting the following variables to empty strings. +# Leave them as they are if you want to help us improving the product. +PUBLIC_TELEMETRY_KEY= +SECRET_TELEMETRY_KEY= + # ---------------------- # - Image configuration - # Unless you really know what you are doing you most likely do not want to @@ -92,16 +102,7 @@ DEV_POSTGRES_PORT=5432 # Unless you work at Agentlabs this part is not for you. # ---------------------- +CLOUD_APP_DOMAIN= CLOUD_APP_WILDCARD_DOMAIN= -CLOUD_CONSOLE_URL= +CLOUD_CONSOLE_DOMAIN= CLOUD_APP_WILDCARD_DOMAIN_DNS_API_KEY= - -# ---------------------- -# - Common configuration -# ---------------------- - -# We use a telemetry service to improve the product. -# You can disable it by setting the following variables to empty strings. -# Leave them as they are if you want to help us improving the product. -PUBLIC_TELEMETRY_KEY= -SECRET_TELEMETRY_KEY= \ No newline at end of file diff --git a/cloud-proxy/Caddyfile b/cloud-proxy/Caddyfile index f52310a..bc6a85a 100644 --- a/cloud-proxy/Caddyfile +++ b/cloud-proxy/Caddyfile @@ -1,3 +1,7 @@ +${CLOUD_APP_DOMAIN}:443 { + reverse_proxy gateway +} + {$CLOUD_APP_WILDCARD_DOMAIN}:443 { tls { dns godaddy {$CLOUD_APP_WILDCARD_DOMAIN_DNS_API_KEY} @@ -6,7 +10,7 @@ reverse_proxy gateway } -{$CLOUD_CONSOLE_URL}:443 { +{$CLOUD_CONSOLE_DOMAIN}:443 { @console { path /admin/* } diff --git a/docker-compose.cloud.yml b/docker-compose.cloud.yml index 271396f..fcba594 100644 --- a/docker-compose.cloud.yml +++ b/docker-compose.cloud.yml @@ -23,7 +23,8 @@ services: depends_on: - gateway environment: - - CLOUD_CONSOLE_URL=${CLOUD_CONSOLE_URL} + - CLOUD_CONSOLE_DOMAIN=${CLOUD_CONSOLE_DOMAIN} + - CLOUD_APP_DOMAIN=${CLOUD_APP_DOMAIN} - CLOUD_APP_WILDCARD_DOMAIN=${CLOUD_APP_WILDCARD_DOMAIN} - CLOUD_APP_WILDCARD_DOMAIN_DNS_API_KEY=${CLOUD_APP_WILDCARD_DOMAIN_DNS_API_KEY} restart: unless-stopped