-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (51 loc) · 1.74 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
services:
app:
image: ${IMAGE}${IMAGE_VER}
restart: always
command: --minify
labels:
- traefik.enable=true
- dcape.traefik.tag=${DCAPE_TAG}
- traefik.http.routers.app.rule=Host(`${APP_SITE:?Must be set}`)
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ${APP_ROOT}:/src
dev:
image: ${IMAGE}${IMAGE_VER}
restart: always
command: --debug server --bind 0.0.0.0 --appendPort=false -b http://${APP_SITE} --liveReloadPort=80 --disableFastRender
labels:
- traefik.enable=true
- dcape.traefik.tag=${DCAPE_TAG}
- traefik.http.routers.${APP_TAG}.rule=Host(`${APP_SITE:?Must be set}`)
- traefik.http.services.${APP_TAG}.loadbalancer.server.port=1313
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ${APP_ROOT}:/src
www:
image: nginx:1.19.4-alpine
labels:
- traefik.enable=true
- dcape.traefik.tag=${DCAPE_TAG}
- traefik.http.routers.${APP_TAG}.rule=Host(`${APP_SITE:?Must be set}`)
# TLS support
- traefik.http.routers.${APP_TAG}.tls=${USE_TLS}
- traefik.http.routers.${APP_TAG}.tls.certresolver=letsEncrypt
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
# Show user's rel IP in logs
- ${APP_ROOT}/realip.conf:/etc/nginx/conf.d/realip.conf:ro
# Send gzipped static
- ${APP_ROOT}/gzip.conf:/etc/nginx/conf.d/gzip.conf:ro
# Enable local 404 eror page
- ${APP_ROOT}/enable404.sh:/docker-entrypoint.d/enable404.sh:ro
# Attach site content
- ${APP_ROOT}/public:/usr/share/nginx/html:ro
restart: always
networks:
default:
name: ${DCAPE_NET}
external: true