Skip to content

Commit e0e1d3e

Browse files
committed
move setting of TRAEFIK_DOMAIN into an environment file
1 parent 629c6ea commit e0e1d3e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

compose/production/traefik/traefik.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ certificatesResolvers:
3131
http:
3232
routers:
3333
web-secure-router:
34-
rule: "Host(`sde-indexing-helper.nasa-impact.net`)"
34+
rule: "Host(`${TRAEFIK_DOMAIN}`)" # Dynamic domain using environment variable
3535
entryPoints:
3636
- web-secure
3737
middlewares:
@@ -42,7 +42,7 @@ http:
4242
certResolver: letsencrypt
4343

4444
flower-secure-router:
45-
rule: "Host(`sde-indexing-helper.nasa-impact.net`)"
45+
rule: "Host(`${TRAEFIK_DOMAIN}`)"
4646
entryPoints:
4747
- flower
4848
service: flower

production.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ services:
3838
- django
3939
volumes:
4040
- production_traefik:/etc/traefik/acme
41+
env_file:
42+
# this should contain TRAEFIK_DOMAIN=sde-indexing-helper-staging.nasa-impact.net or
43+
# TRAEFIK_DOMAIN=sde-indexing-helper.nasa-impact.net or
44+
- ./.envs/.production/.traefik
4145
ports:
4246
- "0.0.0.0:80:80"
4347
- "0.0.0.0:443:443"

0 commit comments

Comments
 (0)