Update docker-compose.yml to follow dcape conventions
- Add dcape.traefik.tag label (required for Traefik discovery) - Add traefik.enable and tls.certresolver labels - Add standard volume mounts for timezone and SSL certs - Configure dcape network as external - Set restart policy to always
This commit is contained in:
parent
f738756664
commit
543ff246d5
|
|
@ -2,12 +2,26 @@
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
|
image: ${IMAGE}:${IMAGE_VER}
|
||||||
labels:
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- dcape.traefik.tag=${DCAPE_TAG}
|
||||||
- traefik.http.routers.${APP_TAG}.rule=Host(`${APP_SITE:?Must be set}`)
|
- 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=default
|
||||||
- traefik.http.routers.${APP_TAG}.tls.domains[0].main=${APP_SITE}
|
- traefik.http.routers.${APP_TAG}.tls.domains[0].main=${APP_SITE}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args:
|
args:
|
||||||
IMAGE: "${IMAGE}"
|
IMAGE: "${IMAGE}"
|
||||||
IMAGE_VER: "${IMAGE_VER}"
|
IMAGE_VER: "${IMAGE_VER}"
|
||||||
|
volumes:
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
- /etc/ssl/certs:/etc/ssl/certs:ro
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: ${DCAPE_NET}
|
||||||
|
external: true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue