From c536ba630eff65a6ef572b2bd2469fdabb70658c Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 24 Oct 2023 11:49:30 +0300 Subject: [PATCH] .env: add APPLICATION variable for nginx.conf --- .env | 1 + config/nginx.conf | 2 +- docker-compose.yml | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 9b904f2..c0de5e3 100644 --- a/.env +++ b/.env @@ -4,6 +4,7 @@ TRAEFIK_APP_NAME= TRAEFIK_ENTRYPOINTS=web-secure # TRAEFIK_ENTRYPOINTS=web-secure-ext WEB_HOST= +APPLICATION= # WEB APP_BASE_PATH=/login diff --git a/config/nginx.conf b/config/nginx.conf index bd49d87..aa2c9d8 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -7,7 +7,7 @@ upstream api { } upstream app { - server application:80; + server $APPLICATION; } include /etc/nginx/include/upstream.conf; diff --git a/docker-compose.yml b/docker-compose.yml index 85eef6c..5faf148 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,6 +41,8 @@ services: file: docker-compose.traefik.yml service: server image: nginx:alpine + environment: + - APPLICATION=${APPLICATION} volumes: - ./config/nginx.conf:/etc/nginx/templates/default.conf.template - ./config/include:/etc/nginx/include