Compare commits

...

2 Commits

Author SHA1 Message Date
jmakdah2 9d1c06edf3 update loomio to version 3.1 2026-07-30 17:09:56 -07:00
renovate-bot 5e468f0820 chore(deps): update loomio/loomio docker tag to v3.0.24
continuous-integration/drone/pr Build is failing
2026-05-14 18:15:18 +00:00
3 changed files with 59 additions and 28 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
export LOOMIO_ENTRYPOINT_VERSION=v8
export LOOMIO_ENTRYPOINT_VERSION=v9
# cannot be integrated into entrypoint.sh as it requires the operator to create a user first
function make_last_user_admin()
+31 -4
View File
@@ -32,7 +32,7 @@ x-environment: &default-env
services:
app:
image: loomio/loomio:v3.0.20
image: loomio/loomio:3.1
configs:
- source: entrypoint
target: /entrypoint.sh
@@ -79,7 +79,7 @@ services:
- "traefik.http.middlewares.${STACK_NAME}.headers.accesscontrolmaxage=100"
- "traefik.http.middlewares.${STACK_NAME}.headers.addvaryheader=true"
worker:
image: loomio/loomio:v3.0.0
image: loomio/loomio:3.1
configs:
- source: entrypoint
target: /entrypoint.sh
@@ -90,7 +90,7 @@ services:
- secret_cookie_token
- db_password
networks:
- backend
- backend
environment:
!!merge <<: *default-env
TASK: worker
@@ -157,7 +157,7 @@ services:
- "traefik.http.routers.channels${STACK_NAME}.entrypoints=web-secure"
cron:
image: loomio/loomio:v3.0.0
image: loomio/loomio:3.1
configs:
- source: entrypoint
target: /entrypoint.sh
@@ -187,6 +187,33 @@ services:
- "swarm.cronjob.schedule=0 * * * *"
restart_policy:
condition: none
haraka:
# container_name: loomio-haraka
image: loomio/haraka-rails-docker:stable
deploy:
restart_policy:
condition: on-failure
networks:
- backend
ports:
- "25:25"
hocuspocus:
# container_name: loomio-hocuspocus
image: loomio/loomio:3.1
deploy:
restart_policy:
condition: on-failure
networks:
- backend
environment:
- TASK=hocuspocus
- VIRTUAL_HOST=hocuspocus.loomio.hackyjackie.com
- LETSENCRYPT_HOST=hocuspocus.loomio.hackyjackie.com
networks:
backend:
proxy:
+27 -23
View File
@@ -39,33 +39,37 @@ if [ -n "$1" ]; then
else
echo "starting loomio!"
if [ "$TASK" = "worker" ]; then
bundle exec sidekiq
else
sudo apt update -y && sudo apt install -y postgresql-client
bundle install
# if [ "$TASK" = "worker" ]; then
# bundle exec sidekiq
# else
# 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."
mkdir -p /loomio/public/client3
cp -r /loomio/client3-build/* /loomio/public/client3/
# 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';")
sudo apt update -y && sudo apt install -y postgresql-client
bundle install
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."
# 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
bundle exec puma -C config/puma.rb
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