Compare commits

...

14 Commits

Author SHA1 Message Date
3wc 93f240b959 chore: publish 0.5.0+v2.22.0 release
continuous-integration/drone/push Build is failing Details
2024-02-08 14:44:36 -03:00
trav e81374b8b7 chore: publish 0.4.1+v2.21.2 release
continuous-integration/drone/push Build is failing Details
2023-11-10 10:45:41 -05:00
trav 134083eb13 two quotes and a comma to fix cron 2023-11-10 10:42:48 -05:00
trav baba7e2a0e chore: publish 0.4.0+v2.21.2 release
continuous-integration/drone/push Build is failing Details
2023-11-10 10:16:12 -05:00
3wc 30e9ade4dc Add release note about NOTIFICATIONS_EMAIL_ADDRESS
continuous-integration/drone/push Build is failing Details
2023-09-22 19:26:58 +01:00
trav 5cf17cb417 chore: publish 0.3.1+v2.19.0 release
continuous-integration/drone/push Build is failing Details
2023-09-22 13:21:54 -04:00
trav 0a56c49916 NOTIFICATIONS_EMAIL_ADDRESS and other statements dreamed up by the absolutely loomiobrained
--3wc
2023-09-22 13:19:59 -04:00
trav 6dcbd3a0b8 readme, apparently
continuous-integration/drone/push Build is failing Details
2023-09-22 12:12:44 -04:00
3wc 2fe463799b chore: publish 0.3.0+v2.19.0 release
continuous-integration/drone/push Build is failing Details
2023-09-22 14:15:21 +01:00
3wc 9f587c6c5a chore: publish 0.2.0+v2.17.3 release
continuous-integration/drone/push Build is failing Details
2023-04-27 18:19:08 -04:00
3wc 3765ceaeb2 Entrypoint tweaks, fix cron container 2023-04-27 14:53:37 -04:00
3wc bb35b39ea9 Move Rails secrets into Docker secrets
continuous-integration/drone/push Build was killed Details
2023-03-14 15:31:55 -04:00
3wc 949f952ae4 Add proper .drone.yml
continuous-integration/drone/push Build is passing Details
2023-01-21 12:09:39 -08:00
3wc 915075da74 Update abra syntax in examples (finally) [mass update] 2023-01-19 16:02:27 -08:00
7 changed files with 125 additions and 16 deletions

View File

@ -0,0 +1,39 @@
---
kind: pipeline
name: deploy to swarm-test.autonomic.zone
steps:
- name: deployment
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: loomio
generate_secrets: true
purge: true
deploy_key:
from_secret: drone_ssh_swarm_test
networks:
- proxy
environment:
DOMAIN: loomio.swarm-test.autonomic.zone
STACK_NAME: loomio
LETS_ENCRYPT_ENV: production
LOOMIO_ENTRYPOINT_VERSION: v1
trigger:
branch:
- main
---
kind: pipeline
name: generate recipe catalogue
steps:
- name: release a new version
image: plugins/downstream
settings:
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -19,6 +19,9 @@ SMTP_PASSWORD=password
SMTP_USE_SSL=1
# to disable SSL comment out line rather than changing to 0
# Whyyyy does this need to be set separately
NOTIFICATIONS_EMAIL_ADDRESS=noreply@example.com
REPLY_HOSTNAME=loomio.example.com
# helper bot is the account which welcomes people to their groups.
@ -37,6 +40,9 @@ FORCE_SSL=1
# Enable rate limiting on group creation, other POST actions
USE_RACK_ATTACK=1
SECRET_DEVISE_SECRET_VERSION=v1 #length=64
SECRET_SECRET_COOKIE_TOKEN_VERSION=v1 #length=64
# Send catch up email (missed yesterday) weekly
# EMAIL_CATCH_UP_WEEKLY=1

View File

@ -19,11 +19,12 @@
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 YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
5. `abra app YOURAPPDOMAIN deploy`
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
8. Give yourself admin rights by running `User.last.update(is_admin: true)`
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik

View File

@ -1 +1 @@
export LOOMIO_ENTRYPOINT_VERSION=v1
export LOOMIO_ENTRYPOINT_VERSION=v3

View File

@ -16,6 +16,7 @@ x-environment: &default-env
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}
@ -24,8 +25,8 @@ x-environment: &default-env
MAX_THREADS: ${MAX_THREADS}
FORCE_SSL: ${FORCE_SSL}
USE_RACK_ATTACK: ${USE_RACK_ATTACK}
DEVISE_SECRET: uuaYZNGgeKCMqGc5pPd3seNSrvKkVO9+pAu6JvrQI4M6T395m8dLJja5qza8HaHY
SECRET_COOKIE_TOKEN: uuaYZNGgeKCMqGc5pPd3seNSrvKkVO9+pAu6JvrQI4M6T395m8dLJja5qza8HaHY
DEVISE_SECRET_FILE: /run/secrets/devise_secret
SECRET_COOKIE_TOKEN_FILE: /run/secrets/secret_cookie_token
SAML_APP_KEY:
SAML_IDP_METADATA_URL:
SAML_ISSUER:
@ -33,12 +34,15 @@ x-environment: &default-env
services:
app:
image: loomio/loomio:v2.11.13
image: loomio/loomio:v2.22.0
configs:
- source: entrypoint
target: /entrypoint.sh
mode: 0555
entrypoint: /entrypoint.sh
secrets:
- devise_secret
- secret_cookie_token
volumes:
- loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage
@ -61,9 +65,17 @@ 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.1.0+v2.7.10"
- "coop-cloud.${STACK_NAME}.version=0.5.0+v2.22.0"
worker:
image: loomio/loomio:v2.11.13
image: loomio/loomio:v2.22.0
configs:
- source: entrypoint
target: /entrypoint.sh
mode: 0555
entrypoint: /entrypoint.sh
secrets:
- devise_secret
- secret_cookie_token
networks:
- backend
environment:
@ -77,7 +89,7 @@ services:
- loomio_files:/loomio/public/files
- loomio_plugins:/loomio/plugins/docker
db:
image: postgres:12.7
image: postgres:12.17
networks:
- backend
volumes:
@ -108,10 +120,16 @@ services:
environment:
- REDIS_URL=redis://redis:6379
cron:
image: loomio/loomio:v2.7.10
entrypoint: "/usr/local/bundle/bin/bundle"
command: ["exec", "rake", "loomio:hourly_tasks"]
image: loomio/loomio:v2.22.0
configs:
- source: entrypoint
target: /entrypoint.sh
mode: 0555
entrypoint: [ "/entrypoint.sh", "rake loomio:hourly_tasks" ]
environment: *default-env
secrets:
- devise_secret
- secret_cookie_token
volumes:
- loomio_uploads:/loomio/public/system
- loomio_storage:/loomio/storage
@ -148,3 +166,11 @@ configs:
entrypoint:
name: ${STACK_NAME}_entrypoint_${LOOMIO_ENTRYPOINT_VERSION}
file: entrypoint.sh
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}

View File

@ -1,10 +1,38 @@
#! /bin/sh
#!/usr/bin/env bash
file_env() {
# 3wc: Load $VAR_FILE into $VAR - useful for secrets. See
# https://medium.com/@adrian.gheorghe.dev/using-docker-secrets-in-your-environment-variables-7a0609659aab
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
file_env "DEVISE_SECRET"
file_env "SECRET_COOKIE_TOKEN"
if test ! -f /loomio/storage/migrations_ran; then
echo "first deploy, running migrations..."
rake db:setup
touch /loomio/storage/migrations_ran
fi
echo "starting loomio!"
/loomio/docker_start.sh
if [ -n "$1" ]; then
echo "Running '$1'"
$1
else
echo "starting loomio!"
/loomio/docker_start.sh
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.