Files

91 lines
2.5 KiB
YAML

---
version: "3.8"
services:
app:
image: nginx:1.31.8-alpine
environment:
- DOMAIN
volumes:
- nginx-data:/usr/share/nginx/website
networks:
- proxy
- internal
configs:
- source: app_entrypoint
target: /docker-entrypoint.d/666-app-entrypoint.sh
mode: 0555
- source: default_conf
target: /etc/nginx/templates/default.conf.template
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}"
- "coop-cloud.${STACK_NAME}.version=v0.7.1+1.31.8-alpine"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
timeout: 10s
retries: 30
start_period: 30s
badger:
image: git.coopcloud.tech/toolshed/site-badger:0.3.0
environment:
- CUSTOM_DEPLOY_ENABLED
- CUSTOM_DEPLOY_SCRIPT
- HUGO_GIT_URL
- HUGO_GIT_BRANCH
- HUGO_PUBLIC_DIR=/usr/share/nginx/website
- HUGO_WORKING_DIR=/root/website
- HUGO_VERSION
- PRIVATE_ENABLED
- WHD_SCRIPTS=/root/scripts
- WHD_HOOK_TIMEOUT=${WHD_HOOK_TIMEOUT:-10}
- HUGO_ENVIRONMENT
- HUGO_BASEURL=https://${HUGO_BASEURL}
command: webhookd
entrypoint: /entrypoint.sh
networks:
- internal
configs:
- source: webhookd_script
target: /root/scripts/deploy.sh
mode: 0555
- source: badger_entrypoint
target: /entrypoint.sh
mode: 0555
volumes:
- nginx-data:/usr/share/nginx/website
networks:
internal:
proxy:
external: true
volumes:
nginx-data:
configs:
webhookd_script:
name: ${STACK_NAME}_webhookd_script_${WEBHOOKD_SCRIPT_VERSION}
file: deploy.sh.tmpl
template_driver: golang
default_conf:
name: ${STACK_NAME}_default_conf_${DEFAULT_CONF_VERSION}
file: default.conf.tmpl
template_driver: golang
app_entrypoint:
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
file: app-entrypoint.sh.tmpl
template_driver: golang
badger_entrypoint:
name: ${STACK_NAME}_badger_entrypoint_${BADGER_ENTRYPOINT_VERSION}
file: badger-entrypoint.sh.tmpl
template_driver: golang