--- version: "3.8" services: app: image: martialblog/limesurvey:5.2.9-220110-apache depends_on: - db networks: - proxy - internal environment: - "DB_HOST=${STACK_NAME}_db" - "DB_PASSWORD_FILE=/run/secrets/db_password" - "ADMIN_PASSWORD_FILE=/run/secrets/limesurvey_admin_password" - "PUBLIC_URL=https://${DOMAIN}" - "BASE_URL=https://${DOMAIN}" 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: - app:/var/www/html/upload/surveys 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=" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080"] interval: 30s timeout: 10s retries: 10 start_period: 1m db: image: mysql:5.7 networks: - internal environment: - "MYSQL_USER=limesurvey" - "MYSQL_DATABASE=limesurvey" - "MYSQL_PASSWORD_FILE=/run/secrets/db_password" - "MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password" volumes: - mariadb:/var/lib/mysql secrets: - db_password - db_root_password volumes: app: mariadb: networks: proxy: external: true internal: configs: entrypoint: name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION} file: entrypoint.sh secrets: db_root_password: external: true name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION} 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}