feat: Utilisation de la variable URL dans docker-compose

This commit is contained in:
Simon 2020-12-21 12:00:08 +01:00
parent cf23e0bc49
commit a7eb2db118
2 changed files with 7 additions and 7 deletions

View File

@ -6,11 +6,6 @@ volumes:
cremeaux-stats: cremeaux-stats:
name: cremeaux-stats name: cremeaux-stats
networks:
default:
external:
name: traefik
services: services:
crmx-prod: crmx-prod:
container_name: crmx-prod container_name: crmx-prod
@ -18,7 +13,7 @@ services:
restart: always restart: always
labels: labels:
traefik.enable: "true" traefik.enable: "true"
traefik.http.routers.crmx-prod.rule: "Host(`cremeaux.fr`)" traefik.http.routers.crmx-prod.rule: "Host(`${URL}`)"
traefik.http.routers.crmx-prod.entrypoints: "web" traefik.http.routers.crmx-prod.entrypoints: "web"
volumes: volumes:
- cremeaux-log:/var/log/nginx - cremeaux-log:/var/log/nginx
@ -35,3 +30,8 @@ services:
- cremeaux-stats:/usr/share/nginx/html/stats - cremeaux-stats:/usr/share/nginx/html/stats
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
networks:
default:
external:
name: traefik

View File

@ -12,7 +12,7 @@ services:
restart: always restart: always
labels: labels:
traefik.enable: "true" traefik.enable: "true"
traefik.http.routers.crmx-staging.rule: "Host(`staging.cremeaux.fr`)" traefik.http.routers.crmx-staging.rule: "Host(`staging.${URL}`)"
traefik.http.routers.crmx-staging.entrypoints: "web" traefik.http.routers.crmx-staging.entrypoints: "web"
volumes: volumes:
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro