loomio/compose.yml
2022-05-09 12:26:28 +01:00

151 lines
3.9 KiB
YAML

---
version: "3.8"
x-environment: &default-env
DATABASE_URL: postgresql://postgres:password@db/loomio_production
REDIS_URL: redis://redis:6379
CANONICAL_HOST: ${DOMAIN}
VIRTUAL_HOST: ${DOMAIN}
CHANNELS_URI: wss://channels.${DOMAIN}
TLD_LENGTH: ${TLD_LENGTH}
SUPPORT_EMAIL: ${SUPPORT_EMAIL}
SMTP_AUTH: ${SMTP_AUTH}
SMTP_DOMAIN: ${SMTP_DOMAIN}
SMTP_SERVER: ${SMTP_SERVER}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
SMTP_USE_SSL: ${SMTP_USE_SSL}
REPLY_HOSTNAME: ${REPLY_HOSTNAME}
HELPER_BOT_EMAIL: ${HELPER_BOT_EMAIL}
RAILS_ENV: ${RAILS_ENV}
PUMA_WORKERS: ${PUMA_WORKERS}
MIN_THREADS: ${MIN_THREADS}
MAX_THREADS: ${MAX_THREADS}
FORCE_SSL: ${FORCE_SSL}
USE_RACK_ATTACK: ${USE_RACK_ATTACK}
DEVISE_SECRET: uuaYZNGgeKCMqGc5pPd3seNSrvKkVO9+pAu6JvrQI4M6T395m8dLJja5qza8HaHY
SECRET_COOKIE_TOKEN: uuaYZNGgeKCMqGc5pPd3seNSrvKkVO9+pAu6JvrQI4M6T395m8dLJja5qza8HaHY
SAML_APP_KEY:
SAML_IDP_METADATA_URL:
SAML_ISSUER:
FEATURES_DISABLE_EMAIL_LOGIN:
services:
app:
image: loomio/loomio:v2.11.13
configs:
- source: entrypoint
target: /entrypoint.sh
mode: 0555
entrypoint: /entrypoint.sh
volumes:
- loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage
- loomio_files:/loomio/public/files
- loomio_plugins:/loomio/plugins/docker
- loomio_import:/import
networks:
- proxy
- backend
depends_on:
- db
- redis
environment: *default-env
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
- "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}"
- "coop-cloud.${STACK_NAME}.version=0.1.0+v2.11.13"
worker:
image: loomio/loomio:v2.11.13
networks:
- backend
environment:
!!merge <<: *default-env
TASK: worker
depends_on:
- app
volumes:
- loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage
- loomio_files:/loomio/public/files
- loomio_plugins:/loomio/plugins/docker
db:
image: postgres:12.7
networks:
- backend
volumes:
- pgdata:/pgdata
- pgdumps:/pgdumps
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=loomio_production
- PGDATA=/pgdata
redis:
image: redis:5.0
networks:
- backend
# mailin:
# image: loomio/mailin-docker:latest
# networks:
# - proxy
# ports:
# - "25:25"
# environment:
# - WEBHOOK_URL=http://app:3000/email_processor/
channels:
image: loomio/loomio_channel_server
networks:
- backend
depends_on:
- redis
environment:
- REDIS_URL=redis://redis:6379
cron:
image: loomio/loomio:v2.7.10
entrypoint: "/usr/local/bundle/bin/bundle"
command: ["exec", "rake", "loomio:hourly_tasks"]
environment: *default-env
volumes:
- loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage
- loomio_files:/loomio/public/files
- loomio_plugins:/loomio/plugins/docker
- loomio_import:/import
networks:
- backend
depends_on:
- db
- redis
deploy:
mode: replicated
replicas: 0
labels:
- "swarm.cronjob.enable=true"
- "swarm.cronjob.schedule=0 * * * *"
restart_policy:
condition: none
networks:
backend:
proxy:
external: true
volumes:
loomio_uploads:
loomio_storage:
loomio_files:
loomio_plugins:
loomio_import:
pgdata:
pgdumps:
configs:
entrypoint:
name: ${STACK_NAME}_entrypoint_${LOOMIO_ENTRYPOINT_VERSION}
file: entrypoint.sh