diff --git a/.env.sample b/.env.sample index 5ab70b6..df2acdb 100644 --- a/.env.sample +++ b/.env.sample @@ -24,8 +24,6 @@ NOTIFICATIONS_EMAIL_ADDRESS=noreply@example.com # reply-to in email notifications REPLY_HOSTNAME=$DOMAIN -# helper bot is the account which welcomes people to their groups. -HELPER_BOT_EMAIL=noreply@loomio.example.com RAILS_ENV=production # Number of webserver processes and threads diff --git a/abra.sh b/abra.sh index aa94473..0d72818 100644 --- a/abra.sh +++ b/abra.sh @@ -1,6 +1,8 @@ export LOOMIO_ENTRYPOINT_VERSION=v5 +# cannot be integrated into entrypoint.sh as it requires the operator to create a user first function make_last_user_admin() { + export DATABASE_URL="postgresql://${POSTGRES_USER}:$(cat /run/secrets/db_password)@db/${POSTGRES_DB}" SECRET_KEY_BASE=$(rake secret) rails runner "User.last.update(is_admin: true)" } \ No newline at end of file diff --git a/compose.yml b/compose.yml index 426e0e0..1ea6ccb 100644 --- a/compose.yml +++ b/compose.yml @@ -6,17 +6,18 @@ x-db-env: &db-env POSTGRES_DB: loomio_production POSTGRES_USER: postgres +x-redis-env: &redis-env + REDIS_URL: redis://redis:6379 + x-environment: &default-env <<: *db-env - REDIS_URL: redis://redis:6379 + <<: *redis-env CANONICAL_HOST: ${DOMAIN} VIRTUAL_HOST: ${DOMAIN} CHANNELS_URI: wss://channels.${DOMAIN} - TLD_LENGTH: ${TLD_LENGTH} SUPPORT_EMAIL: ${SUPPORT_EMAIL} NOTIFICATIONS_EMAIL_ADDRESS: ${NOTIFICATIONS_EMAIL_ADDRESS} REPLY_HOSTNAME: ${REPLY_HOSTNAME} - HELPER_BOT_EMAIL: ${HELPER_BOT_EMAIL} RAILS_ENV: ${RAILS_ENV} PUMA_WORKERS: ${PUMA_WORKERS} MIN_THREADS: ${MIN_THREADS} @@ -71,7 +72,7 @@ services: - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - "coop-cloud.${STACK_NAME}.version=0.6.0+v2.25.2" - - "backupbot.backup=true" + - "backupbot.backup:=${ENABLE_BACKUPS:-true}" worker: image: loomio/loomio:v2.25.2 configs: @@ -135,7 +136,7 @@ services: depends_on: - redis environment: - - REDIS_URL=redis://redis:6379 + <<: *redis-env cron: image: loomio/loomio:v2.25.2 configs: