-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (34 loc) · 1.32 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: '3.8'
x-default-opts:
&default-opts
logging:
options:
max-size: '1m'
max-file: '3'
services:
nginx:
image: ghcr.io/uccser/csanz:master
deploy:
replicas: 1
placement:
constraints:
- node.role==worker
- node.labels.role==apps
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.docker.network=uccser-public"
- "traefik.http.services.csanz-nginx.loadbalancer.server.port=8080"
- "traefik.http.routers.csanz-nginx.service=csanz-nginx"
- "traefik.http.routers.csanz-nginx.rule=Host(`www.csanz.ac.nz`) || Host(`csanz.ac.nz`)"
- "traefik.http.routers.csanz-nginx.entryPoints=web"
# Redirect non-www to www.
- "traefik.http.middlewares.csanz-redirect-non-www.redirectregex.regex=^https://csanz\\.ac\\.nz(.*)"
- "traefik.http.middlewares.csanz-redirect-non-www.redirectregex.replacement=https://www.csanz.ac.nz$${1}"
- "traefik.http.middlewares.csanz-redirect-non-www.redirectregex.permanent=true"
networks:
- uccser-public
networks:
uccser-public:
external: true