2021-12-27 15:45:58 +00:00
|
|
|
---
|
2021-04-29 20:42:25 +00:00
|
|
|
version: "3.8"
|
2021-12-27 15:45:58 +00:00
|
|
|
|
|
|
|
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}
|
2023-09-22 16:26:40 +00:00
|
|
|
NOTIFICATIONS_EMAIL_ADDRESS: ${NOTIFICATIONS_EMAIL_ADDRESS}
|
2021-12-27 15:45:58 +00:00
|
|
|
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}
|
2023-03-14 19:31:55 +00:00
|
|
|
DEVISE_SECRET_FILE: /run/secrets/devise_secret
|
|
|
|
SECRET_COOKIE_TOKEN_FILE: /run/secrets/secret_cookie_token
|
2021-12-27 15:45:58 +00:00
|
|
|
SAML_APP_KEY:
|
|
|
|
SAML_IDP_METADATA_URL:
|
|
|
|
SAML_ISSUER:
|
2022-01-14 14:09:32 +00:00
|
|
|
FEATURES_DISABLE_EMAIL_LOGIN:
|
2021-12-27 15:45:58 +00:00
|
|
|
|
2021-04-29 20:42:25 +00:00
|
|
|
services:
|
|
|
|
app:
|
2023-11-10 15:14:38 +00:00
|
|
|
image: loomio/loomio:v2.21.2
|
2022-02-08 16:09:18 +00:00
|
|
|
configs:
|
|
|
|
- source: entrypoint
|
|
|
|
target: /entrypoint.sh
|
|
|
|
mode: 0555
|
|
|
|
entrypoint: /entrypoint.sh
|
2023-03-14 19:31:55 +00:00
|
|
|
secrets:
|
|
|
|
- devise_secret
|
|
|
|
- secret_cookie_token
|
2021-04-29 20:42:25 +00:00
|
|
|
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
|
2021-12-27 15:45:58 +00:00
|
|
|
environment: *default-env
|
2021-04-29 20:42:25 +00:00
|
|
|
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}"
|
2023-11-10 15:14:38 +00:00
|
|
|
- "coop-cloud.${STACK_NAME}.version=0.4.0+v2.21.2"
|
2021-04-29 20:42:25 +00:00
|
|
|
worker:
|
2023-11-10 15:14:38 +00:00
|
|
|
image: loomio/loomio:v2.21.2
|
2023-03-14 19:31:55 +00:00
|
|
|
configs:
|
|
|
|
- source: entrypoint
|
|
|
|
target: /entrypoint.sh
|
|
|
|
mode: 0555
|
|
|
|
entrypoint: /entrypoint.sh
|
|
|
|
secrets:
|
|
|
|
- devise_secret
|
|
|
|
- secret_cookie_token
|
2021-04-29 20:42:25 +00:00
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
environment:
|
2021-12-27 15:45:58 +00:00
|
|
|
!!merge <<: *default-env
|
|
|
|
TASK: worker
|
2022-02-08 16:09:18 +00:00
|
|
|
depends_on:
|
|
|
|
- app
|
2021-04-29 20:42:25 +00:00
|
|
|
volumes:
|
|
|
|
- loomio_uploads:/loomio/public/system
|
|
|
|
- loomio_storage:/loomio/storage
|
|
|
|
- loomio_files:/loomio/public/files
|
|
|
|
- loomio_plugins:/loomio/plugins/docker
|
|
|
|
db:
|
2023-04-27 22:19:08 +00:00
|
|
|
image: postgres:12.14
|
2021-04-29 20:42:25 +00:00
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
volumes:
|
2021-04-30 20:46:14 +00:00
|
|
|
- pgdata:/pgdata
|
|
|
|
- pgdumps:/pgdumps
|
2021-04-29 20:42:25 +00:00
|
|
|
environment:
|
2021-05-29 22:40:55 +00:00
|
|
|
- POSTGRES_PASSWORD=password
|
|
|
|
- POSTGRES_DB=loomio_production
|
|
|
|
- PGDATA=/pgdata
|
2021-04-29 20:42:25 +00:00
|
|
|
redis:
|
|
|
|
image: redis:5.0
|
|
|
|
networks:
|
|
|
|
- backend
|
2022-05-09 11:27:33 +00:00
|
|
|
#mailin:
|
|
|
|
# image: loomio/mailin-docker:latest
|
|
|
|
# networks:
|
|
|
|
# - proxy
|
|
|
|
# ports:
|
|
|
|
# - "25:25"
|
|
|
|
# environment:
|
|
|
|
# - WEBHOOK_URL=http://app:3000/email_processor/
|
2021-04-29 20:42:25 +00:00
|
|
|
channels:
|
|
|
|
image: loomio/loomio_channel_server
|
|
|
|
networks:
|
2021-04-30 20:46:14 +00:00
|
|
|
- backend
|
2021-04-29 20:42:25 +00:00
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
environment:
|
|
|
|
- REDIS_URL=redis://redis:6379
|
2022-05-09 11:26:28 +00:00
|
|
|
cron:
|
2023-11-10 15:14:38 +00:00
|
|
|
image: loomio/loomio:v2.21.2
|
2023-04-27 18:53:37 +00:00
|
|
|
configs:
|
|
|
|
- source: entrypoint
|
|
|
|
target: /entrypoint.sh
|
|
|
|
mode: 0555
|
2023-11-10 15:41:38 +00:00
|
|
|
entrypoint: [ "/entrypoint.sh", "rake loomio:hourly_tasks" ]
|
2022-05-09 11:26:28 +00:00
|
|
|
environment: *default-env
|
2023-04-27 18:53:37 +00:00
|
|
|
secrets:
|
|
|
|
- devise_secret
|
|
|
|
- secret_cookie_token
|
2022-05-09 11:26:28 +00:00
|
|
|
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
|
2021-04-29 20:42:25 +00:00
|
|
|
networks:
|
|
|
|
backend:
|
|
|
|
proxy:
|
|
|
|
external: true
|
|
|
|
volumes:
|
|
|
|
loomio_uploads:
|
|
|
|
loomio_storage:
|
|
|
|
loomio_files:
|
|
|
|
loomio_plugins:
|
|
|
|
loomio_import:
|
2021-04-30 20:46:14 +00:00
|
|
|
pgdata:
|
|
|
|
pgdumps:
|
2022-02-08 16:09:18 +00:00
|
|
|
|
|
|
|
configs:
|
|
|
|
entrypoint:
|
|
|
|
name: ${STACK_NAME}_entrypoint_${LOOMIO_ENTRYPOINT_VERSION}
|
|
|
|
file: entrypoint.sh
|
2023-03-14 19:31:55 +00:00
|
|
|
|
|
|
|
secrets:
|
|
|
|
devise_secret:
|
|
|
|
external: true
|
|
|
|
name: ${STACK_NAME}_devise_secret_${SECRET_DEVISE_SECRET_VERSION}
|
|
|
|
secret_cookie_token:
|
|
|
|
external: true
|
|
|
|
name: ${STACK_NAME}_secret_cookie_token_${SECRET_SECRET_COOKIE_TOKEN_VERSION}
|