79 lines
2.1 KiB
YAML
79 lines
2.1 KiB
YAML
---
|
|
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
image: nginx:1.25.3-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}`)"
|
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
|
|
|
badger:
|
|
image: codeberg.org/eotl/site-badger:0.1.0
|
|
environment:
|
|
- CUSTOM_DEPLOY_ENABLED
|
|
- CUSTOM_DEPLOY_SCRIPT
|
|
- HUGO_GIT_URL
|
|
- HUGO_PUBLIC_DIR=/usr/share/nginx/website
|
|
- HUGO_WORKING_DIR=/root/website
|
|
- PRIVATE_ENABLED
|
|
- WHD_SCRIPTS=/root/scripts
|
|
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
|