custom-html/compose.yml

41 lines
1.4 KiB
YAML
Raw Normal View History

2020-10-06 18:48:21 +00:00
version: "3.8"
services:
app:
image: nginx:1.19.2
networks:
- proxy
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
2020-10-06 19:09:14 +00:00
# Redirect from EXTRA_DOMAINS to DOMAIN
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
2021-04-05 00:07:21 +00:00
- coop-cloud.${STACK_NAME}.app.version=1.19.2-c628b67d
2020-10-06 19:09:14 +00:00
volumes:
- content:/usr/share/nginx/html
2020-12-27 13:46:53 +00:00
configs:
- source: nginx_default_conf
target: /etc/nginx/conf.d/default.conf
2021-04-05 00:07:21 +00:00
#healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
2020-10-06 19:09:14 +00:00
volumes:
content:
2020-12-27 13:46:53 +00:00
configs:
nginx_default_conf:
name: ${STACK_NAME}_nginx_default_conf_${NGINX_DEFAULT_CONF_VERSION}
file: default.conf
2020-10-06 18:48:21 +00:00
networks:
proxy:
external: true