43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
version: "3.8"
|
|
services:
|
|
frontend:
|
|
image: httpd:2.4.62
|
|
networks:
|
|
- proxy
|
|
depends_on:
|
|
- app
|
|
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}"
|
|
# 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}"
|
|
- coop-cloud.${STACK_NAME}.frontend.version=1.20-c628b67d
|
|
volumes:
|
|
- site_content:/var/www/html/
|
|
entrypoint: "/docker-entrypoint.sh"
|
|
|
|
configs:
|
|
- source: entrypoint_httpd_conf
|
|
target: /docker-entrypoint.sh
|
|
mode: 0555
|
|
- source: httpd_vhosts_conf
|
|
target: /usr/local/apache2/conf/extra/httpd-vhosts.conf
|
|
|
|
|
|
configs:
|
|
entrypoint_httpd_conf:
|
|
name: ${STACK_NAME}_entrypoint_httpd_conf_${ENTRYPOINT_HTTPD_CONF_VERSION}
|
|
file: entrypoint.httpd.sh
|
|
httpd_vhosts_conf:
|
|
name: ${STACK_NAME}_httpd_vhosts_conf_${HTTPD_VHOSTS_CONF_VERSION}
|
|
file: httpd-vhosts.conf
|
|
template_driver: golang
|