24 Commits

Author SHA1 Message Date
45c7b2aaef chore: publish 1.0.0+4.0.2 release 2025-06-03 14:20:59 +02:00
91e8018410 chore: publish 0.7.0+3.11.2 release 2025-01-28 18:10:14 +01:00
4a4e536125 add deploy timeout and healthcheck without curl 2025-01-28 18:09:41 +01:00
0d1bbfa99a Update .drone.yml 2025-01-08 10:09:13 -08:00
957eb45fea fix drone runner 2024-10-25 22:12:08 +02:00
2b7bcd5a67 chore: publish 0.6.1+3.10.1 release 2024-10-22 21:54:31 +02:00
27dd971444 update backupbot labels 2024-10-22 21:54:28 +02:00
6be1ac13b8 chore: publish 0.6.0+3.10.1 release 2024-09-26 15:43:30 +02:00
db812fd1d3 add shared secret to alaconnect 2024-05-15 11:00:08 +02:00
4ba224875f add alakazam integration file alaconnect.yml 2024-05-13 17:37:57 +02:00
e794bc21fd chore: publish 0.5.3+3.5.1 release 2024-03-28 12:26:03 +01:00
3wc
e85b902262 chore: publish 0.5.1+3.5.1 release 2024-02-05 13:12:05 -03:00
3wc
d134057749 More drone fixing 🤖🔧 2024-02-05 13:08:05 -03:00
3wc
b2319ae650 Fix Drone 2024-02-05 13:05:09 -03:00
466126e7d1 chore: publish 0.5.0+3.5.1 release 2024-02-01 14:16:59 +01:00
b95df148f8 upgrade to v3.5 and add OIDC 2024-01-15 16:52:40 +01:00
9ca0c76307 chore: publish 0.4.1+2.11.1 release 2023-10-19 23:44:06 +02:00
3d21efaa48 add backup label 2023-10-19 23:41:49 +02:00
9a6f96952b chore: publish 0.4.0+2.11.1 release 2023-07-19 10:37:26 +02:00
b3b6841e0b add auto update and timeout env 2023-04-18 18:24:17 +02:00
6ee83da0d7 chore: publish 0.3.0+2.8.3 release 2023-04-05 18:59:45 +02:00
bd95492d79 fix: set postgres password from secret for app container 2023-03-07 16:08:02 +01:00
4e2fc582bc chore: publish 0.2.0+2.2.3 release 2023-03-07 15:48:27 +01:00
df6b7c29ab Update 'README.md' 2023-02-28 20:03:56 +00:00
11 changed files with 124 additions and 16 deletions

View File

@ -6,7 +6,7 @@ steps:
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: {{ .Name }}
stack: rallly
generate_secrets: true
purge: true
deploy_key:
@ -14,9 +14,14 @@ steps:
networks:
- proxy
environment:
DOMAIN: {{ .Name }}.swarm-test.autonomic.zone
STACK_NAME: {{ .Name }}
DOMAIN: rallly.swarm-test.autonomic.zone
STACK_NAME: rallly
LETS_ENCRYPT_ENV: production
SECRET_SECRET_KEY_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
SECRET_SMTP_PWD_VERSION: v1
APP_ENTRYPOINT_VERSION: v1
PG_BACKUP_VERSION: v1
trigger:
branch:
- main
@ -32,7 +37,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,10 +1,15 @@
TYPE=rallly
TIMEOUT=300
ENABLE_AUTO_UPDATE=true
ENABLE_BACKUPS=true
DOMAIN=rallly.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.rallly.example.com`'
COMPOSE_FILE="compose.yml"
LETS_ENCRYPT_ENV=production
SECRET_SECRET_KEY_VERSION=v1
@ -16,3 +21,11 @@ SMTP_HOST=mail.example.com
SMTP_PORT=465
SMTP_SECURE=true
SMTP_USER=noreply@example.com
#COMPOSE_FILE="$COMPOSE_FILE:compose.oidc.yml"
#OIDC_ENABLED=1
#OIDC_NAME= #The user-facing name of your provider as it will be shown on the login page
#OIDC_DISCOVERY_URL= #URL of the .well-known/openid-configuration endpoint for your OIDC provider
#OIDC_CLIENT_ID=
#OIDC_ISSUER_URL=
#SECRET_OIDC_CLIENT_SECRET_VERSION=v1

View File

@ -1,6 +1,6 @@
# rallly
> One line description of the recipe
> [Rally](https://github.com/lukevella/rallly) is a tool to schedule group meetings. Create meeting polls to find the best date and time to organize an event based on participants' availability. Save time and avoid back-and-forth emails.
<!-- metadata -->

View File

@ -1 +1,2 @@
export APP_ENTRYPOINT_VERSION=v1
export APP_ENTRYPOINT_VERSION=v3
export PG_BACKUP_VERSION=v1

12
alaconnect.yml Normal file
View File

@ -0,0 +1,12 @@
authentik:
env:
OIDC_NAME: "Authentik"
OIDC_DISCOVERY_URL: "https://authentik.example.com/application/o/rallly/.well-known/openid-configuration"
OIDC_ISSUER_URL: "https://authentik.example.com/application/o/rallly/"
OIDC_CLIENT_ID: rallly
uncomment:
- compose.oidc.yml
- SECRET_OIDC_CLIENT_SECRET_VERSION
- OIDC_ENABLED
shared_secrets:
rallly_secret: oidc_client_secret

16
compose.oidc.yml Normal file
View File

@ -0,0 +1,16 @@
---
version: "3.8"
services:
app:
secrets:
- oidc_client_secret
environment:
- OIDC_ENABLED
- OIDC_NAME
- OIDC_DISCOVERY_URL
- OIDC_CLIENT_ID
secrets:
oidc_client_secret:
name: ${STACK_NAME}_oidc_client_secret_${SECRET_OIDC_CLIENT_SECRET_VERSION}
external: true

View File

@ -3,7 +3,8 @@ version: "3.8"
services:
app:
image: lukevella/rallly:2.1.1
image: lukevella/rallly:4.0.2
hostname: 0.0.0.0
networks:
- proxy
- internal
@ -12,9 +13,13 @@ services:
secrets:
- secret_key
- smtp_pwd
- db_password
environment:
- DATABASE_URL=postgres://postgres:postgres@rallly_db:5432/db
- NEXT_PUBLIC_BASE_URL=${DOMAIN}
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- DATABASE=rallly_db:5432/db
- NEXT_PUBLIC_BASE_URL=https://${DOMAIN}
- NEXT_PUBLIC_APP_BASE_URL=https://${DOMAIN}
- NEXTAUTH_URL=$NEXT_PUBLIC_BASE_URL
- SECRET_PASSWORD_FILE=/run/secrets/secret_key
- SUPPORT_EMAIL
- SMTP_HOST
@ -40,15 +45,22 @@ services:
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=0.1.0+2.1.1"
- "coop-cloud.${STACK_NAME}.version=1.0.0+4.0.2"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/3000; exit $$?;'"
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
rallly_db:
image: postgres:14.2
image: postgres:14.8
deploy:
labels:
backupbot.backup: "${ENABLE_BACKUPS:-true}"
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.db-data.path: "backup.sql"
backupbot.restore.post-hook: '/pg_backup.sh restore'
volumes:
- db-data:/var/lib/postgresql/data
secrets:
@ -56,6 +68,7 @@ services:
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- POSTGRES_DB=db
- POSTGRES_USER=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
@ -63,6 +76,10 @@ services:
retries: 5
networks:
- internal
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
secrets:
db_password:
@ -81,9 +98,6 @@ networks:
internal:
volumes:
mongodb_log:
mongodb_lib:
mongodb:
db-data:
configs:
@ -91,3 +105,6 @@ configs:
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh

View File

@ -1,5 +1,9 @@
#!/bin/bash
{{ if eq (env "OIDC_ENABLED") "1" }}
export OIDC_CLIENT_SECRET=$(cat /run/secrets/oidc_client_secret)
{{ end }}
set -eu
file_env() {
@ -25,5 +29,9 @@ file_env() {
file_env "SECRET_PASSWORD"
file_env "SMTP_PWD"
file_env "POSTGRES_PASSWORD"
file_env "OIDC_CLIENT_SECRET"
/usr/src/app/scripts/docker-start.sh
export DATABASE_URL=postgres://postgres:$POSTGRES_PASSWORD@$DATABASE
/app/docker-start.sh

34
pg_backup.sh Normal file
View File

@ -0,0 +1,34 @@
#!/bin/bash
set -e
BACKUP_FILE='/var/lib/postgresql/data/backup.sql'
function backup {
export PGPASSWORD=$(cat /run/secrets/db_password)
pg_dump -U ${POSTGRES_USER} ${POSTGRES_DB} > $BACKUP_FILE
}
function restore {
cd /var/lib/postgresql/data/
restore_config(){
# Restore allowed connections
cat pg_hba.conf.bak > pg_hba.conf
su postgres -c 'pg_ctl reload'
}
# Don't allow any other connections than local
cp pg_hba.conf pg_hba.conf.bak
echo "local all all trust" > pg_hba.conf
su postgres -c 'pg_ctl reload'
trap restore_config EXIT INT TERM
# Recreate Database
psql -U ${POSTGRES_USER} -d postgres -c "DROP DATABASE ${POSTGRES_DB} WITH (FORCE);"
createdb -U ${POSTGRES_USER} ${POSTGRES_DB}
psql -U ${POSTGRES_USER} -d ${POSTGRES_DB} -1 -f $BACKUP_FILE
trap - EXIT INT TERM
restore_config
}
$@

1
release/0.5.0+3.5.1 Normal file
View File

@ -0,0 +1 @@
Rallly and recipe now support oidc. But you need to be registered to create polls now.

1
release/1.0.0+4.0.2 Normal file
View File

@ -0,0 +1 @@
BREAKING CHANGE: SSO requires OIDC_ISSUER_URL env.