--- version: "3.8" services: app: image: "backdrop:1.32.1" entrypoint: /docker-entrypoint.sh environment: - BACKDROP_DB_HOST=db - BACKDROP_DB_USER=backdrop - BACKDROP_DB_NAME=backdrop - BACKDROP_DB_PASSWORD_FILE=/run/secrets/db_password - BACKDROP_SETTINGS=/var/www/html/settings.php configs: - source: app_entrypoint target: /docker-entrypoint.sh mode: 0555 networks: - proxy - internal volumes: - "backdrop_files:/var/www/html/files" - "backdrop_modules:/var/www/html/modules" - "backdrop_themes:/var/www/html/themes" - "backdrop_layouts:/var/www/html/layouts" secrets: - db_password deploy: labels: - "traefik.enable=true" - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.${STACK_NAME}.entrypoints=websecure" - "traefik.http.routers.${STACK_NAME}.tls=true" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=letsencrypt" - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80" - "coop-cloud.${STACK_NAME}.version=0.1.0+1.32.1" - "backupbot.backup=true" - "backupbot.backup.path=/var/www/html/files" - "backupbot.backup.pre-hook=mysqldump -h db -u backdrop -p$(cat /run/secrets/db_password) backdrop > /var/www/html/files/db_backup.sql" - "backupbot.backup.post-hook=rm -f /var/www/html/files/db_backup.sql" update_config: failure_action: rollback order: start-first rollback_config: order: start-first restart_policy: max_attempts: 3 db: image: "mariadb:11.4" environment: - MYSQL_DATABASE=backdrop - MYSQL_USER=backdrop - MYSQL_PASSWORD_FILE=/run/secrets/db_password - MYSQL_RANDOM_ROOT_PASSWORD=yes volumes: - "mariadb:/var/lib/mysql" networks: - internal secrets: - db_password healthcheck: test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"] interval: 10s timeout: 5s retries: 5 deploy: update_config: failure_action: rollback order: start-first rollback_config: order: start-first restart_policy: max_attempts: 3 networks: proxy: external: true name: "coopcloud" internal: internal: true volumes: backdrop_files: {} backdrop_modules: {} backdrop_themes: {} backdrop_layouts: {} mariadb: {} secrets: db_password: external: true name: "${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}" configs: app_entrypoint: name: "${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}" file: entrypoint.sh.tmpl template_driver: golang