Files
limesurvey/compose.yml
Simon 0a6a7b737c
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
chore: publish 2.0.0+6.6.5-240924-apache release
2025-04-15 14:08:33 +02:00

105 lines
3.0 KiB
YAML

---
version: "3.8"
services:
app:
image: martialblog/limesurvey:6.6.5-240924-apache
depends_on:
- db
networks:
- proxy
- internal
environment:
- "DB_HOST=${STACK_NAME}_db"
- "DB_TYPE=pgsql"
- "DB_PORT=5432"
- "DB_PASSWORD_FILE=/run/secrets/db_password"
- ADMIN_EMAIL
- ADMIN_USER
- ADMIN_NAME
- "ADMIN_PASSWORD_FILE=/run/secrets/limesurvey_admin_password"
- "PUBLIC_URL=https://${DOMAIN}"
- "BASE_URL"
configs:
- source: entrypoint
target: /usr/local/bin/custom-entrypoint.sh
mode: 0555
secrets:
- db_password
- limesurvey_admin_password
entrypoint: /usr/local/bin/custom-entrypoint.sh
volumes:
- config:/var/www/html/application/config
- app:/var/www/html/upload
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8080"
- "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}.version=2.0.0+6.6.5-240924-apache"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
db:
image: postgres:14-alpine
networks:
- internal
environment:
- POSTGRES_DB=limesurvey
- POSTGRES_USER=limesurvey
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
secrets:
- db_password
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres:/var/lib/postgresql/data
deploy:
labels:
backupbot.backup: "${ENABLE_BACKUPS:-true}"
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.database.path: "backup.sql"
backupbot.restore.post-hook: '/pg_backup.sh restore'
volumes:
app:
config:
postgres:
networks:
proxy:
external: true
internal:
configs:
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
limesurvey_admin_password:
external: true
name: ${STACK_NAME}_limesurvey_admin_password_${SECRET_LIMESURVEY_ADMIN_PASSWORD_VERSION}