forked from coop-cloud/baserow
69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
---
|
|
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
image: baserow/baserow:1.35.3
|
|
networks:
|
|
- proxy
|
|
environment:
|
|
- BASEROW_PUBLIC_URL=https://${DOMAIN}
|
|
- SECRET_KEY_FILE=/run/secrets/secret_key
|
|
- BASEROW_JWT_SIGNING_KEY_FILE=/run/secrets/jwt_key
|
|
- BASEROW_CADDY_ADDRESSES=:80
|
|
- BASEROW_BUILDER_DOMAINS=${WILDCARD_DOMAIN}
|
|
secrets:
|
|
- secret_key
|
|
- jwt_key
|
|
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}`${EXTRA_DOMAINS}) || HostRegexp(`{subdomain:\\w+}.${WILDCARD_DOMAIN}`)"
|
|
- "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}"
|
|
- "backupbot.backup=true"
|
|
- "backupbot.backup.path=/baserow/data"
|
|
- "backupbot.backup.pre-hook=/backup.sh pre-backup"
|
|
- "backupbot.backup.post-hook=/backup.sh post-backup"
|
|
- "backupbot.restore.post-hook=/backup.sh post-restore"
|
|
- "coop-cloud.${STACK_NAME}.version=1.2.0+1.35.3"
|
|
healthcheck:
|
|
test: ["CMD", "./baserow.sh", "backend-cmd", "backend-healthcheck"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 10
|
|
start_period: 1m
|
|
volumes:
|
|
- baserow_data:/baserow/data
|
|
configs:
|
|
- source: backup-postgres
|
|
target: /backup.sh
|
|
mode: 0777
|
|
|
|
volumes:
|
|
baserow_data:
|
|
|
|
configs:
|
|
backup-postgres:
|
|
name: backup-postgres_${PG_BACKUP_CONFIG_VERSION}
|
|
file: ./backup-postgres.sh
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|
|
|
|
secrets:
|
|
secret_key:
|
|
external: true
|
|
name: ${STACK_NAME}_secret_key_${SECRET_SECRET_KEY_VERSION}
|
|
jwt_key:
|
|
external: true
|
|
name: ${STACK_NAME}_jwt_key_${SECRET_JWT_KEY_VERSION}
|