adds more recipe stuff
* secrets * extract admin_name and admin_email * unset BASE_URL env for me the it broke the url path actually, this setting (https://github.com/martialblog/docker-limesurvey/blob/master/5.0/apache/entrypoint.sh#L112) is not documented (https://manual.limesurvey.org/Optional_settings), so not sure what it actually does * backupbot labels
This commit is contained in:
parent
04df81ea8f
commit
656d8d5545
|
@ -7,6 +7,9 @@ DOMAIN=limesurvey.example.com
|
||||||
|
|
||||||
LETS_ENCRYPT_ENV=production
|
LETS_ENCRYPT_ENV=production
|
||||||
|
|
||||||
|
ADMIN_EMAIL=admin@example.com
|
||||||
|
ADMIN_NAME=admin
|
||||||
|
|
||||||
SECRET_DB_PASSWORD_VERSION=v1
|
SECRET_DB_PASSWORD_VERSION=v1
|
||||||
SECRET_DB_ROOT_PASSWORD_VERSION=v1
|
SECRET_DB_ROOT_PASSWORD_VERSION=v1
|
||||||
SECRET_LIMESURVEY_ADMIN_PASSWORD_VERSION=v1
|
SECRET_LIMESURVEY_ADMIN_PASSWORD_VERSION=v1
|
||||||
|
|
16
compose.yml
16
compose.yml
|
@ -3,7 +3,7 @@ version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: martialblog/limesurvey:5.2.9-220110-apache
|
image: martialblog/limesurvey:5.3.18-220530-apache
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
networks:
|
networks:
|
||||||
|
@ -12,9 +12,11 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- "DB_HOST=${STACK_NAME}_db"
|
- "DB_HOST=${STACK_NAME}_db"
|
||||||
- "DB_PASSWORD_FILE=/run/secrets/db_password"
|
- "DB_PASSWORD_FILE=/run/secrets/db_password"
|
||||||
|
- ADMIN_EMAIL
|
||||||
|
- ADMIN_NAME
|
||||||
- "ADMIN_PASSWORD_FILE=/run/secrets/limesurvey_admin_password"
|
- "ADMIN_PASSWORD_FILE=/run/secrets/limesurvey_admin_password"
|
||||||
- "PUBLIC_URL=https://${DOMAIN}"
|
- "PUBLIC_URL=https://${DOMAIN}"
|
||||||
- "BASE_URL=https://${DOMAIN}"
|
- "BASE_URL"
|
||||||
configs:
|
configs:
|
||||||
- source: entrypoint
|
- source: entrypoint
|
||||||
target: /usr/local/bin/custom-entrypoint.sh
|
target: /usr/local/bin/custom-entrypoint.sh
|
||||||
|
@ -37,6 +39,8 @@ services:
|
||||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||||
- "coop-cloud.${STACK_NAME}.version="
|
- "coop-cloud.${STACK_NAME}.version="
|
||||||
|
- "backupbot.backup=true"
|
||||||
|
- "backupbot.backup.path=/var/www/html/upload/surveys"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
@ -57,6 +61,12 @@ services:
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- db_root_password
|
- db_root_password
|
||||||
|
deploy:
|
||||||
|
labels:
|
||||||
|
backupbot.backup: "true"
|
||||||
|
backupbot.backup.pre-hook: 'mkdir -p /tmp/backup/ && mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" limesurvey > /tmp/backup/backup.sql'
|
||||||
|
backupbot.backup.post-hook: "rm -rf /tmp/backup"
|
||||||
|
backupbot.backup.path: "/tmp/backup/"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
app:
|
app:
|
||||||
|
@ -81,4 +91,4 @@ secrets:
|
||||||
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
||||||
limesurvey_admin_password:
|
limesurvey_admin_password:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_limesurvey_admin_password_${SECRET_LIMESURVEY_ADMIN_PASSWORD_VERSION}
|
name: ${STACK_NAME}_limesurvey_admin_password_${SECRET_LIMESURVEY_ADMIN_PASSWORD_VERSION}
|
||||||
|
|
Loading…
Reference in New Issue