new grist recipe

This commit is contained in:
trav 2024-03-26 14:51:08 -04:00
parent e5522f68cc
commit 65115108ce
1 changed files with 62 additions and 20 deletions

View File

@ -1,32 +1,74 @@
---
version: "3.8"
services: services:
app: grist:
image: nginx:1.20.0 image: gristlabs/grist:1.1.7
networks: networks:
- proxy - proxy
- internal
environment:
- GRIST_DATABASE_URL=postgresql://${STACK_NAME}_db:5432/grist
- GRIST_REDIS_URL=redis://${STACK_NAME}_redis:6379
- GRIST_DATA_DIR=/var/grist-data
- GRIST_SUPPORT_ANON
- GRIST_SESSION_SECRET
- GRIST_SANDBOX_FLAVOR
- APP_HOME_URL=https://${DOMAIN}
- APP_DOC_URL=https://${DOMAIN}
- GRIST_SINGLE_ORG
- GRIST_ORG_IN_PATH
- COOKIE_MAX_AGE
- GRIST_FORCE_LOGIN
- GRIST_HIDE_UI_ELEMENTS
- GRIST_DEFAULT_EMAIL
volumes:
- grist_keys:/keys
- grist_data:/persist
depends_on:
- db
- redis
deploy: deploy:
restart_policy:
condition: on-failure
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80" - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8484"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})" - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
## Redirect from EXTRA_DOMAINS to DOMAIN - "caddy=${DOMAIN}"
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" - "caddy.reverse_proxy={{upstreams 8484}}"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" - "caddy.tls.on_demand="
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=" db:
healthcheck: image: postgres:13
test: ["CMD", "curl", "-f", "http://localhost"] networks:
interval: 30s - internal
timeout: 10s secrets:
retries: 10 - db_password
start_period: 1m volumes:
- 'postgresql_data:/var/lib/postgresql/data'
environment:
- POSTGRES_USER=grist
- POSTGRES_DB=grist
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
redis:
image: redis:7.2-alpine
networks:
- internal
volumes:
- 'redis_data:/data'
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password
volumes:
postgresql_data:
redis_data:
grist_data:
grist_keys:
networks: networks:
proxy: proxy:
external: true external: true
internal: