Compare commits

...

62 Commits

Author SHA1 Message Date
fe7aa8d879 add jmakdah2 and moosemower as maintainers
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2026-05-11 16:37:01 -07:00
c82a68bb97 Merge pull request 'chore: Configure Renovate' (#22) from renovate/configure into main
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #22
2026-03-16 09:15:13 +00:00
2a635edeed chore: publish 5.2.0+v3.0.20 release
Some checks failed
continuous-integration/drone/push Build is failing
Note: this upgrade incorporates the fix for Loomio edit issue (https://github.com/loomio/loomio/issues/11903)
Reviewed-on: https://git.coopcloud.tech/coop-cloud/loomio/pulls/23
Reviewed-by: ammaratef45 <ammaratef45@proton.me>
Co-authored-by: Jackie Makdah <jackiemak22@proton.me>
Co-committed-by: Jackie Makdah <jackiemak22@proton.me>
2026-03-13 01:05:20 +00:00
6c8e4706f1 Add renovate.json
Some checks failed
continuous-integration/drone/pr Build is failing
2026-03-10 19:21:45 +00:00
4fd70fe19a chore: publish 5.1.3+v3.0.0 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2026-02-19 20:27:09 -08:00
6a7050cd1f add app_url env variable
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2025-12-15 21:42:32 -08:00
2ea69cb952 chore: publish 5.1.2+v3.0.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-08-03 15:58:57 -07:00
a323593824 Merge pull request 'fix for OAUTH_ENABLED check' (#17) from patch_5.1.1_release into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #17
Reviewed-by: ammaratef45 <ammaratef45@proton.me>
2025-08-03 22:55:54 +00:00
746413e31e fix for OAUTH_ENABLED check
Some checks failed
continuous-integration/drone/pr Build is failing
2025-08-02 12:37:16 -07:00
973fd2a751 chore: publish 5.1.1+v3.0.0 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-07-31 17:08:31 -07:00
0a33f87074 Merge pull request 'update entrypoint version' (#16) from patch_5.1.0_release into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #16
2025-08-01 00:07:30 +00:00
90ddc72c37 update entrypoint version
Some checks failed
continuous-integration/drone/pr Build is failing
2025-07-31 17:04:55 -07:00
c2421778af chore: publish 5.1.0+v3.0.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-07-31 16:55:05 -07:00
efa3e2e036 remove manual release notes 2025-07-31 16:54:44 -07:00
5deafb6ed5 Merge pull request 'add OAuth2 env variables' (#14) from jmakdah2/loomio:OAuth2 into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #14
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2025-07-31 23:30:50 +00:00
8e577ae8af add OAUTH_ENABLED env variable
Some checks failed
continuous-integration/drone/pr Build is failing
2025-07-28 21:07:16 -07:00
9531f4fe40 add compose.oauth.yml file
Some checks failed
continuous-integration/drone/pr Build is failing
2025-07-27 17:52:57 -07:00
e9ec238865 add OAuth2 env variables
Some checks failed
continuous-integration/drone/pr Build is failing
2025-07-23 16:17:11 -07:00
bc6f625ac5 chore: publish 5.0.0+v3.0.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-06-25 10:47:34 -07:00
79a45d9aca Merge pull request 'make channels container externally available' (#12) from fix-channels-container into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #12
Reviewed-by: 3wordchant <3wordchant@noreply.git.coopcloud.tech>
2025-06-06 19:19:06 +00:00
ca5f94f089 little more security
Some checks failed
continuous-integration/drone/pr Build is failing
2025-05-04 13:48:40 +02:00
6aeb853a3a add swarm-cronjob to install guide
Some checks failed
continuous-integration/drone/pr Build is failing
2025-05-03 15:44:06 +02:00
5a94634d19 add CORS header
Some checks failed
continuous-integration/drone/pr Build is failing
2025-05-03 15:04:31 +02:00
92a1cbe865 make channels container externally available
Some checks failed
continuous-integration/drone/pr Build is failing
2025-05-03 14:30:53 +02:00
0e786fefcc chore: publish 4.0.2+v2.25.4 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-04-15 20:21:08 +02:00
121e9d76c0 fix: Use different yaml merge style
All checks were successful
continuous-integration/drone/push Build is passing
For more information see: toolshed/abra#534
2025-04-15 20:18:17 +02:00
3wc
8f2cbfed46 chore: publish 4.0.1+v2.25.4 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-04-10 19:23:35 +01:00
014deacc0f chore: publish 4.0.0+v2.25.3 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-03-03 16:39:56 +01:00
1a937addc2 upgrade postgres DB version to 17, this time for real.
All checks were successful
continuous-integration/drone/push Build is passing
2025-03-03 16:35:09 +01:00
1f9471d71d chore: publish 3.0.0+v2.25.3 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-03-03 16:33:23 +01:00
233097e0e6 upgrading postgres shall be done in the next release.
All checks were successful
continuous-integration/drone/push Build is passing
2025-03-03 16:28:58 +01:00
4dcae7074e remove unused code
Some checks failed
continuous-integration/drone/push Build is failing
2025-03-01 12:55:18 +01:00
c9d4987e6f db:prepare is running in issues, therefore use single db commands depending on the state of the database. tested with fresh deployment and migrations
All checks were successful
continuous-integration/drone/push Build is passing
2025-03-01 12:54:15 +01:00
b5eec9e10f chore: publish 2.1.0+v2.25.3 release 2025-02-21 18:33:21 +01:00
c6afdb09c0 move contents of loomios docker_start.sh to entrypoint.sh. unclear why this helps
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-19 13:26:21 +01:00
8761f3dc6e adding another race condition prevention
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-16 14:20:32 +01:00
3wc
8dcb1f35e8 Update 1.0.0 release notes
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-12 20:31:11 -05: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
b1e51d5402 chore: publish 1.0.0+v2.25.2 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-02-12 17:36:29 +01:00
af0c49e465 prepare releasenotes
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-12 17:34:39 +01:00
56fae2d10e remove duplicated var
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-12 17:19:25 +01:00
09269f2303 keep using old db name
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-12 16:59:32 +01:00
63ecaa148e add some documentation
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-12 16:10:04 +01:00
11bb2233bf ensure upgradability for postgres database
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-12 15:03:35 +01:00
3wc
6a6f6240b5 Add missing secrets for CI
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-11 11:49:25 -05:00
f8eff5044e remove outdated env vars and fix make_last_user_admin
Some checks failed
continuous-integration/drone/push Build is failing
2025-02-10 15:43:12 +01:00
7581ab7ecf added backup
Some checks failed
continuous-integration/drone/push Build is failing
2025-02-09 20:28:16 +01:00
3587172e5f use docker secret for mail and seperate compose file
Some checks failed
continuous-integration/drone/push Build is failing
2025-02-09 19:48:48 +01:00
6c29012f1b add healthchecks where possible
Some checks failed
continuous-integration/drone/push Build is failing
2025-02-09 18:43:29 +01:00
6004522de6 store DB password in secret. make entrypoint more robust.
Some checks failed
continuous-integration/drone/push Build is failing
2025-02-09 17:59:02 +01:00
4df10ce60d Update .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing
2025-01-08 10:09:13 -08:00
170a1782f6 chore: publish 0.6.0+v2.25.2 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2024-10-09 13:33:34 -04:00
3wc
93f240b959 chore: publish 0.5.0+v2.22.0 release
Some checks failed
continuous-integration/drone/push Build is failing
2024-02-08 14:44:36 -03:00
e81374b8b7 chore: publish 0.4.1+v2.21.2 release
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-10 10:45:41 -05:00
134083eb13 two quotes and a comma to fix cron 2023-11-10 10:42:48 -05:00
baba7e2a0e chore: publish 0.4.0+v2.21.2 release
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-10 10:16:12 -05:00
3wc
30e9ade4dc Add release note about NOTIFICATIONS_EMAIL_ADDRESS
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-22 19:26:58 +01:00
5cf17cb417 chore: publish 0.3.1+v2.19.0 release
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-22 13:21:54 -04:00
0a56c49916 NOTIFICATIONS_EMAIL_ADDRESS and other statements dreamed up by the absolutely loomiobrained
--3wc
2023-09-22 13:19:59 -04:00
6dcbd3a0b8 readme, apparently
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-22 12:12:44 -04:00
3wc
2fe463799b chore: publish 0.3.0+v2.19.0 release
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-22 14:15:21 +01:00
19 changed files with 330 additions and 56 deletions

View File

@ -18,6 +18,11 @@ steps:
STACK_NAME: loomio
LETS_ENCRYPT_ENV: production
LOOMIO_ENTRYPOINT_VERSION: v1
SECRET_DEVISE_SECRET_VERSION: v1
SECRET_SECRET_COOKIE_TOKEN_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
SECRET_SMTP_PASSWORD_VERSION: v1
SECRET_OAUTH_APP_SECRET_VERSION: v1
trigger:
branch:
- main
@ -33,7 +38,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -1,28 +1,29 @@
TYPE=loomio
COMPOSE_FILE="compose.yml"
DOMAIN=loomio.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.loomio.example.com`'
LETS_ENCRYPT_ENV=production
# the number of dots in your hostname
TLD_LENGTH=3
# TODO 3wc: is this needed?
# mail setup
COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml"
SUPPORT_EMAIL=noreply@example.com
SMTP_AUTH=plain
SMTP_DOMAIN=example.com
SMTP_SERVER=example.com
SMTP_PORT=587
SMTP_USERNAME=noreply@example.com
SMTP_PASSWORD=password
SMTP_USE_SSL=1
# to disable SSL comment out line rather than changing to 0
SECRET_SMTP_PASSWORD_VERSION=v1
REPLY_HOSTNAME=loomio.example.com
# From field for notification e-mails
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
@ -39,6 +40,7 @@ USE_RACK_ATTACK=1
SECRET_DEVISE_SECRET_VERSION=v1 #length=64
SECRET_SECRET_COOKIE_TOKEN_VERSION=v1 #length=64
SECRET_DB_PASSWORD_VERSION=v1
# Send catch up email (missed yesterday) weekly
# EMAIL_CATCH_UP_WEEKLY=1
@ -88,3 +90,17 @@ SECRET_SECRET_COOKIE_TOKEN_VERSION=v1 #length=64
# THEME_ACCENT_COLOR=rgb(0,188,212)
# THEME_TEXT_ON_PRIMARY_COLOR=rgb(255,255,255)
# THEME_TEXT_ON_ACCENT_COLOR=rgb(255,255,255)
# env variables needed to enable OAuth2 authentication
# COMPOSE_FILE="$COMPOSE_FILE:compose.oauth.yml"
# OAUTH_ENABLED=1
# OAUTH_AUTH_URL=
# OAUTH_TOKEN_URL=
# OAUTH_PROFILE_URL=
# OAUTH_SCOPE=
# OAUTH_APP_KEY=
# OAUTH_ATTR_UID=
# OAUTH_ATTR_NAME=
# OAUTH_ATTR_EMAIL=
# OAUTH_LOGIN_PROVIDER_NAME=
# SECRET_OAUTH_APP_SECRET_VERSION=v1

View File

@ -0,0 +1,16 @@
---
name: "Loomio pull request template"
about: "Loomio pull request template"
---
<!--
Thank you for doing recipe maintenance work!
Please mark all checklist items which are relevant for your changes.
Please remove the checklist items which are not relevant for your changes.
Feel free to remove this comment.
-->
* [ ] I have deployed and tested my changes
* [ ] I have [updated relevant versions in `abra.sh`](https://docs.coopcloud.tech/maintainers/upgrade/#updating-versions-in-the-abrash)
* [ ] I have made my environment variable changes [backwards compatible](https://docs.coopcloud.tech/maintainers/upgrade/#backwards-compatible-environment-variable-changes)
* [ ] I have added a [release note entry](https://docs.coopcloud.tech/maintainers/upgrade/#creating-new-release-notes)

32
MAINTENANCE.md Normal file
View File

@ -0,0 +1,32 @@
# Loomio Recipe Maintenance
All contributions should be made via a pull request. This is to ensure a
certain quality and consistency, that others can rely on.
## Maintainer Responsibilities
A recipe maintainer has the following responsibilities:
- Respond to pull requests / issues within a week
- Make image security updates within a day
- Make image patch / minor updates within a week
- Make image major updates within a month
In order to fullfill these responsibilities a recipe maintainer:
- Has to watch the repository (to get notifications)
- Needs to make sure renovate is configured properly
## Pull Requests
A pull request can be merged if it is approved by at least one maintainer. For
pull requests opened by a maintainer they need to be approved by another
maintainer. Even though it is okay to merge a pull request with one approval, it
is always better if all maintainers looked at the pull request and approved it.
## Become a maintainer
Everyone can apply to be a recipe maintainer:
1. Watch the repository to always get updates
2. Simply add your self to the list in the [README.md](./README.md) and open a new pull request with the change.
3. Once the pull request gets merged you will be added to the [loomio maintainers team](https://git.coopcloud.tech/org/coop-cloud/teams/loomio-maintainers).

View File

@ -3,27 +3,48 @@
"Loomio is a collaborative decision-making tool that makes it easy for anyone to participate in decisions which affect them. To find out more, visit Loomio.org."
<!-- metadata -->
* **Maintainer**: [@jmakdah2](https://git.coopcloud.tech/jmakdah2)[@moosemower](https://git.coopcloud.tech/moosemower)
* **Category**: Apps
* **Status**: 0, work-in-progress
* **Image**: [`loomio/*`](https://hub.docker.com/r/loomio)
* **Healthcheck**: No
* **Backups**: No
* **Email**: ?
* **Status**: 3, work-in-progress
* **Image**: [`loomio/*`](https://hub.docker.com/r/loomio), 4, upstream
* **Healthcheck**: Yes
* **Backups**: Yes
* **Email**: Outgoing yes, incoming no
* **Tests**: No
* **SSO**: No
<!-- endmetadata -->
## Basic usage
1. Set up Docker Swarm and [`abra`]
2. Deploy [`coop-cloud/traefik`]
3. `abra app new loomio` (optionally with `--pass` if you'd like
to save secrets in `pass`)
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
5. `abra app deploy YOURAPPDOMAIN`
6. This should be automated but you also need to run `abra app run loomio_some_domain app rake db:migrate`
7. Open the configured domain in your browser to finish set-up
* `abra app new loomio --secrets ` (optionally with `--pass` if you'd like to save secrets in `pass`)
* `abra app config <app-name>`
* insert your smtp password with `abra app secret insert <app-name> smtp_password v1 "<your-password>"`
* `abra app deploy <app-name>`
* Open the configured domain in your browser to create your user account (only works in case mail is configured correctly)
* Give yourself admin rights by running `abra app cmd <app-name> app make_last_user_admin`
* Deploy [swarm-cronjob](https://recipes.coopcloud.tech/swarm-cronjob) on your server if it is not running yet. This is needed for loomios cron container to be started to do hourly chores.
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
## Migration guide
### Upgrading to 4.0.0+v2.25.3 and later
* Before upgrading to `4.0.0+v2.25.3` and later, one successful deployment of `3.0.0+v2.25.3` shall be performed. Doing both at the same time will lead to complications as 3.0.0 runs rails DB migrations and 4.0.0 upgrades the postgres DB version.
### Broken releases
Please do not use these releases, as they are having issues regarding database migrations:
* 1.0.0+v2.25.2
* 2.0.0+v2.25.3
* 2.1.0+v2.25.3
### Manual migration steps when upgrading from 0.6.0+v2.25.2 and earlier to 1.0.0+v2.25.2 and later
* adapt your env file with the new vars, especially SECRET_DB_PASSWORD_VERSION=v1 and SECRET_SMTP_PASSWORD_VERSION=v1
* insert your smtp password with `abra app secret insert <app-name> smtp_password v1 "<your-password>"`
* `abra app secret generate <app-name> db_password v1`
* `abra app deploy <app-name>`
* set the new password in DB: `abra app cmd <app-name> db set_new_db_password`
* redeploy if necessary
For more, see [docs.coopcloud.tech](https://docs.coopcloud.tech).

17
abra.sh
View File

@ -1 +1,16 @@
export LOOMIO_ENTRYPOINT_VERSION=v3
export LOOMIO_ENTRYPOINT_VERSION=v8
# 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)"
}
# only run when upgrading from 0.6.0+v2.25.2 and earlier to 1.0.0+v2.25.2 and later
function set_new_db_password()
{
echo "setting new password for db user..."
psql -U $POSTGRES_USER -c "ALTER USER $POSTGRES_USER PASSWORD '$(cat /run/secrets/db_password)';"
echo "done"
}

31
compose.oauth.yml Normal file
View File

@ -0,0 +1,31 @@
version: "3.8"
x-oauth-env: &oauth-env
OAUTH_AUTH_URL:
OAUTH_TOKEN_URL:
OAUTH_PROFILE_URL:
OAUTH_SCOPE:
OAUTH_APP_KEY:
OAUTH_APP_SECRET_FILE: /run/secrets/oauth_app_secret
OAUTH_ATTR_UID:
OAUTH_ATTR_NAME:
OAUTH_ATTR_EMAIL:
OAUTH_LOGIN_PROVIDER_NAME:
OAUTH_ENABLED:
services:
app:
environment:
*oauth-env
secrets:
- oauth_app_secret
worker:
environment:
*oauth-env
secrets:
- oauth_app_secret
secrets:
oauth_app_secret:
name: ${STACK_NAME}_oauth_app_secret_${SECRET_OAUTH_APP_SECRET_VERSION}
external: true

28
compose.smtp.yml Normal file
View File

@ -0,0 +1,28 @@
version: "3.8"
x-mail-env: &mail-env
SMTP_AUTH: ${SMTP_AUTH}
SMTP_DOMAIN: ${SMTP_DOMAIN}
SMTP_SERVER: ${SMTP_SERVER}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD:
SMTP_PASSWORD_FILE: /run/secrets/smtp_password
SMTP_USE_SSL: ${SMTP_USE_SSL}
services:
app:
secrets:
- smtp_password
environment:
*mail-env
worker:
secrets:
- smtp_password
environment:
*mail-env
secrets:
smtp_password:
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
external: true

View File

@ -1,23 +1,22 @@
---
version: "3.8"
x-environment: &default-env
DATABASE_URL: postgresql://postgres:password@db/loomio_production
x-db-env: &db-env
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
POSTGRES_DB: loomio_production
POSTGRES_USER: postgres
x-redis-env: &redis-env
REDIS_URL: redis://redis:6379
x-environment: &default-env
<<: [*db-env, *redis-env]
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}
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}
@ -33,7 +32,7 @@ x-environment: &default-env
services:
app:
image: loomio/loomio:v2.17.3
image: loomio/loomio:v3.0.20
configs:
- source: entrypoint
target: /entrypoint.sh
@ -42,6 +41,7 @@ services:
secrets:
- devise_secret
- secret_cookie_token
- db_password
volumes:
- loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage
@ -55,6 +55,12 @@ services:
- db
- redis
environment: *default-env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 10
start_period: 2m
deploy:
restart_policy:
condition: on-failure
@ -64,9 +70,16 @@ services:
- "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.2.0+v2.17.3"
- "coop-cloud.${STACK_NAME}.version=5.2.0+v3.0.20"
- "backupbot.backup:=${ENABLE_BACKUPS:-true}"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}"
- "traefik.http.middlewares.${STACK_NAME}.headers.accesscontrolallowmethods=GET,OPTIONS,PUT"
- "traefik.http.middlewares.${STACK_NAME}.headers.accesscontrolallowheaders=*"
- "traefik.http.middlewares.${STACK_NAME}.headers.accessControlAllowOriginList=https://*.${DOMAIN}"
- "traefik.http.middlewares.${STACK_NAME}.headers.accesscontrolmaxage=100"
- "traefik.http.middlewares.${STACK_NAME}.headers.addvaryheader=true"
worker:
image: loomio/loomio:v2.17.3
image: loomio/loomio:v3.0.0
configs:
- source: entrypoint
target: /entrypoint.sh
@ -75,6 +88,7 @@ services:
secrets:
- devise_secret
- secret_cookie_token
- db_password
networks:
- backend
environment:
@ -88,20 +102,31 @@ services:
- loomio_files:/loomio/public/files
- loomio_plugins:/loomio/plugins/docker
db:
image: postgres:12.14
# loomio version upgrades and postgres version upgrade should not be performed at the same time.
image: pgautoupgrade/pgautoupgrade:17-debian
networks:
- backend
volumes:
- pgdata:/pgdata
- pgdumps:/pgdumps
secrets:
- db_password
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=loomio_production
- PGDATA=/pgdata
<<: *db-env
PGDATA: /pgdata
deploy:
labels:
backupbot.backup: "${ENABLE_BACKUPS:-true}"
backupbot.backup.pre-hook: sh -c 'pg_dump -U "$$POSTGRES_USER" -Fc "$$POSTGRES_DB" | gzip > "/postgres.dump.gz"'
backupbot.backup.path: "/postgres.dump.gz"
backupbot.backup.post-hook: "rm -f /postgres.dump.gz"
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'
redis:
image: redis:5.0
image: redis:8.0
networks:
- backend
healthcheck:
test: ["CMD", "redis-cli", "ping"]
#mailin:
# image: loomio/mailin-docker:latest
# networks:
@ -114,21 +139,35 @@ services:
image: loomio/loomio_channel_server
networks:
- backend
- proxy
depends_on:
- redis
environment:
- REDIS_URL=redis://redis:6379
<<: *redis-env
VIRTUAL_HOST: channels.${DOMAIN}
APP_URL: ${DOMAIN}
deploy:
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.channels${STACK_NAME}.rule=Host(`channels.${DOMAIN}`)"
- "traefik.http.routers.channels${STACK_NAME}.tls=true"
- "traefik.http.routers.channels${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.services.channels${STACK_NAME}.loadbalancer.server.port=5000"
- "traefik.http.routers.channels${STACK_NAME}.entrypoints=web-secure"
cron:
image: loomio/loomio:v2.17.3
image: loomio/loomio:v3.0.0
configs:
- source: entrypoint
target: /entrypoint.sh
mode: 0555
entrypoint: [ "/entrypoint.sh", "rake", "loomio:hourly_tasks" ]
entrypoint: [ "/entrypoint.sh", "rake loomio:hourly_tasks" ]
environment: *default-env
secrets:
- devise_secret
- secret_cookie_token
- db_password
volumes:
- loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage
@ -159,7 +198,6 @@ volumes:
loomio_plugins:
loomio_import:
pgdata:
pgdumps:
configs:
entrypoint:
@ -173,3 +211,6 @@ secrets:
secret_cookie_token:
external: true
name: ${STACK_NAME}_secret_cookie_token_${SECRET_SECRET_COOKIE_TOKEN_VERSION}
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}

View File

@ -23,16 +23,49 @@ file_env() {
file_env "DEVISE_SECRET"
file_env "SECRET_COOKIE_TOKEN"
file_env "POSTGRES_PASSWORD"
file_env "SMTP_PASSWORD"
if [ "$OAUTH_ENABLED" = "1" ]; then
file_env "OAUTH_APP_SECRET"
fi
export DB_HOST="db"
export DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}"
if test ! -f /loomio/storage/migrations_ran; then
echo "first deploy, running migrations..."
rake db:setup
touch /loomio/storage/migrations_ran
fi
if [ -n "$1" ]; then
echo "Running '$1'"
$1
else
echo "starting loomio!"
/loomio/docker_start.sh
if [ "$TASK" = "worker" ]; then
bundle exec sidekiq
else
sudo apt update -y && sudo apt install -y postgresql-client
bundle install
# running this code instaed of db:prepare in docker_start.sh in loomio container
# as postgres container creates empty db, somehow db:prepare cannot cope.
# therefore we run db:setup or db:migrate individually
if PGPASSWORD=$(cat /run/secrets/db_password) psql -U "$POSTGRES_USER" -h "$DB_HOST" -lqt | cut -d \| -f 1 | grep -wq "$POSTGRES_DB"; then
echo "database '$POSTGRES_DB' exists."
# check if the database contains tables
TABLE_COUNT=$(PGPASSWORD=$(cat /run/secrets/db_password) psql -U "$POSTGRES_USER" -h "$DB_HOST" -d "$POSTGRES_DB" -t -c "SELECT count(*) FROM information_schema.tables WHERE table_schema = 'public';")
if [ "$TABLE_COUNT" -eq 0 ]; then
echo "Database '$POSTGRES_DB' is empty, running db:setup."
bundle exec rake db:setup
else
echo "database '$POSTGRES_DB' not empty, running migrations."
bundle exec rake db:migrate
fi
else
echo "database '$POSTGRES_DB' does not exist, running db:setup."
bundle exec rake db:setup
fi
bundle exec puma -C config/puma.rb
fi
fi

9
release/0.3.1+v2.19.0 Normal file
View File

@ -0,0 +1,9 @@
Loomio seems to have added a new setting, NOTIFICATIONS_EMAIL_ADDRESS, to
define what address transactional emails should come from.
If you don't set it, it will default to notifications@$MAIL_DOMAIN, which is
unlikely to work in many cases.
If you find that transactional emails aren't working, try setting
NOTIFICATIONS_EMAIL_ADDRESS to the same value as SUPPORT_EMAIL,
HELPER_BOT_EMAIL, or SMTP_USERNAME.

14
release/1.0.0+v2.25.2 Normal file
View File

@ -0,0 +1,14 @@
In this release the passwords for smtp and postgres DB were moved into docker secrets. Therefore a few manual steps need to be performed (also available in recipe documentation)
* adapt your env file with the new vars, especially `SECRET_DB_PASSWORD_VERSION=v1` and `SECRET_SMTP_PASSWORD_VERSION=v1` (remember, you can use `abra app check <app-name>` to check for any missing variables)
* insert your existing smtp password with `abra app secret insert <app-name> smtp_password v1 "<your-password>"`
Then, choose whether to keep the existing insecure database password (easy):
* `abra app secret insert <app-name> db_password v1 password`
Or, switch to a new secure password (harder, better):
* `abra app secret generate <app-name> db_password v1`
* `abra app deploy <app-name>`
* set the new password in DB: `abra app cmd <app-name> db set_new_db_password` (NOTE: if you get "FATA loomio doesn't have a set_new_db_password function" here, run `cd ~/.abra/recipes/loomio && git checkout main`, then re-run the `abra app cmd` command with `-C` at the end)
* redeploy

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!

1
release/2.1.0+v2.25.3 Normal file
View File

@ -0,0 +1 @@
DB initialization issues with wrong migration should be fixed now. (But not really sure why)

1
release/3.0.0+v2.25.3 Normal file
View File

@ -0,0 +1 @@
ATTENTION: do not skip this relase, otherwise it will lead to database migration complications. This release fixes migration issues of 1.x and 2.x releases.

1
release/4.0.0+v2.25.3 Normal file
View File

@ -0,0 +1 @@
ATTENTION: Perform a deployment of version 3.0.0+v2.25.3 before upgrading to this version. Otherwise there will be complications with database migrations. This version upgrades the used postgres container to version 17 with auto-upgrade functionality.

1
release/5.1.0+v3.0.0 Normal file
View File

@ -0,0 +1 @@
Add support for OAuth2. To use this feature copy and populate the new oauth2 env variables from the .env.sample to your locale .env config and insert the oauth2_app_secret secret into your recipe:

1
release/5.2.0+v3.0.20 Normal file
View File

@ -0,0 +1 @@
upgrade loomio from version 3.0.0 to 3.0.20

6
renovate.json Normal file
View File

@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}