3 Commits

Author SHA1 Message Date
112a1f6d3a add redis password and increase version. does not work yet
Some checks failed
continuous-integration/drone/pr Build is failing
2025-02-16 11:49:16 +01:00
f65e5eec94 chore: publish 2.0.0+v2.25.3 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-02-12 19:00:42 +01:00
134db112a7 upgrade postgres db to version 17 and loomio minor version
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-12 18:59:18 +01:00
5 changed files with 37 additions and 7 deletions

View File

@ -41,6 +41,7 @@ USE_RACK_ATTACK=1
SECRET_DEVISE_SECRET_VERSION=v1 #length=64 SECRET_DEVISE_SECRET_VERSION=v1 #length=64
SECRET_SECRET_COOKIE_TOKEN_VERSION=v1 #length=64 SECRET_SECRET_COOKIE_TOKEN_VERSION=v1 #length=64
SECRET_DB_PASSWORD_VERSION=v1 SECRET_DB_PASSWORD_VERSION=v1
SECRET_REDIS_PASSWORD_VERSION=v1
# Send catch up email (missed yesterday) weekly # Send catch up email (missed yesterday) weekly
# EMAIL_CATCH_UP_WEEKLY=1 # EMAIL_CATCH_UP_WEEKLY=1

View File

@ -1,4 +1,5 @@
export LOOMIO_ENTRYPOINT_VERSION=v5 export LOOMIO_ENTRYPOINT_VERSION=v5
export REDIS_ENTRYPOINT_VERSION=v1
# cannot be integrated into entrypoint.sh as it requires the operator to create a user first # cannot be integrated into entrypoint.sh as it requires the operator to create a user first
function make_last_user_admin() function make_last_user_admin()

View File

@ -7,7 +7,8 @@ x-db-env: &db-env
POSTGRES_USER: postgres POSTGRES_USER: postgres
x-redis-env: &redis-env x-redis-env: &redis-env
REDIS_URL: redis://redis:6379 REDIS_PASSWORD_FILE: /run/secrets/redis_password
REDIS_URL: redis://:{REDIS_PASSWORD}@redis:6379
x-environment: &default-env x-environment: &default-env
<<: *db-env <<: *db-env
@ -33,7 +34,7 @@ x-environment: &default-env
services: services:
app: app:
image: loomio/loomio:v2.25.2 image: loomio/loomio:v2.25.3
configs: configs:
- source: entrypoint - source: entrypoint
target: /entrypoint.sh target: /entrypoint.sh
@ -43,6 +44,7 @@ services:
- devise_secret - devise_secret
- secret_cookie_token - secret_cookie_token
- db_password - db_password
- redis_password
volumes: volumes:
- loomio_uploads:/loomio/public/system - loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage - loomio_storage:/loomio/storage
@ -71,10 +73,10 @@ services:
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})" - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "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}"
- "coop-cloud.${STACK_NAME}.version=1.0.0+v2.25.2" - "coop-cloud.${STACK_NAME}.version=2.0.0+v2.25.3"
- "backupbot.backup:=${ENABLE_BACKUPS:-true}" - "backupbot.backup:=${ENABLE_BACKUPS:-true}"
worker: worker:
image: loomio/loomio:v2.25.2 image: loomio/loomio:v2.25.3
configs: configs:
- source: entrypoint - source: entrypoint
target: /entrypoint.sh target: /entrypoint.sh
@ -84,6 +86,7 @@ services:
- devise_secret - devise_secret
- secret_cookie_token - secret_cookie_token
- db_password - db_password
- redis_password
networks: networks:
- backend - backend
environment: environment:
@ -97,7 +100,7 @@ services:
- loomio_files:/loomio/public/files - loomio_files:/loomio/public/files
- loomio_plugins:/loomio/plugins/docker - loomio_plugins:/loomio/plugins/docker
db: db:
image: postgres:12.17 image: pgautoupgrade/pgautoupgrade:17-debian
networks: networks:
- backend - backend
volumes: volumes:
@ -116,11 +119,19 @@ services:
backupbot.restore: "true" backupbot.restore: "true"
backupbot.restore.post-hook: sh -c 'gzip -d /postgres.dump.gz && pg_restore --clean -U "$$POSTGRES_USER" --dbname="$$POSTGRES_DB" < /postgres.dump && rm -f /postgres.dump' backupbot.restore.post-hook: sh -c 'gzip -d /postgres.dump.gz && pg_restore --clean -U "$$POSTGRES_USER" --dbname="$$POSTGRES_DB" < /postgres.dump && rm -f /postgres.dump'
redis: redis:
image: redis:5.0 image: redis:7.4
networks: networks:
- backend - backend
command: /bin/sh -c "redis-server redis.conf --loglevel debug"
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "ping"] test: ["CMD", "redis-cli", "ping"]
secrets:
- redis_password
configs:
- source: entrypoint_redis
target: /entrypoint.sh
mode: 0555
entrypoint: /entrypoint.sh
#mailin: #mailin:
# image: loomio/mailin-docker:latest # image: loomio/mailin-docker:latest
# networks: # networks:
@ -135,10 +146,12 @@ services:
- backend - backend
depends_on: depends_on:
- redis - redis
secrets:
- redis_password
environment: environment:
<<: *redis-env <<: *redis-env
cron: cron:
image: loomio/loomio:v2.25.2 image: loomio/loomio:v2.25.3
configs: configs:
- source: entrypoint - source: entrypoint
target: /entrypoint.sh target: /entrypoint.sh
@ -149,6 +162,7 @@ services:
- devise_secret - devise_secret
- secret_cookie_token - secret_cookie_token
- db_password - db_password
- redis_password
volumes: volumes:
- loomio_uploads:/loomio/public/system - loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage - loomio_storage:/loomio/storage
@ -184,6 +198,9 @@ configs:
entrypoint: entrypoint:
name: ${STACK_NAME}_entrypoint_${LOOMIO_ENTRYPOINT_VERSION} name: ${STACK_NAME}_entrypoint_${LOOMIO_ENTRYPOINT_VERSION}
file: entrypoint.sh file: entrypoint.sh
entrypoint_redis:
name: ${STACK_NAME}_entrypoint_redis_${REDIS_ENTRYPOINT_VERSION}
file: entrypoint.redis.sh
secrets: secrets:
devise_secret: devise_secret:
@ -195,3 +212,6 @@ secrets:
db_password: db_password:
external: true external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION} name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
redis_password:
external: true
name: ${STACK_NAME}_redis_password_${SECRET_REDIS_PASSWORD_VERSION}

6
entrypoint.redis.sh Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
echo "creating redis.conf..."
echo "requirepass $(cat /run/secrets/redis_password)" > redis.conf
echo "redis.conf created"

2
release/2.0.0+v2.25.3 Normal file
View File

@ -0,0 +1,2 @@
The major change in this release is the upgrade of postgres db from 10 to 17. As we use a container with automatic migration, this should work seemlessly without operator intervention.
NEVERTHELESS, please create a BACKUP before you upgrade to this version!