54 Commits

Author SHA1 Message Date
4403f37d6c chore: publish 1.0.1+v4.7.0 release 2026-04-10 20:32:46 -04:00
2e50333c03 Merge commit '92364ba' 2026-04-10 20:30:47 -04:00
92364ba5be bugfixes 2026-04-10 20:29:45 -04:00
b23d78e0a4 unique hostname for proxy forwarding 2026-04-10 20:05:51 -04:00
c3624e477b unique hostname for proxy forwarding 2026-04-10 20:05:41 -04:00
b9c36f8c15 update readme 2026-04-10 14:35:20 -04:00
c5965f4193 chore: publish 1.0.0+v4.7.0 release 2026-04-10 14:24:08 -04:00
855cd3407b update create tables command in readme 2026-04-10 14:19:14 -04:00
088f525ef8 force nginx to resolve the domain for liberaforms, previously it could use stale IP addresses 2026-04-10 14:19:01 -04:00
bae1bdbcf3 update comments in .env 2026-04-10 14:18:30 -04:00
447c38413a comply with abra, movie nginx to "proxy" service and liberaforms to "app" service 2026-04-10 14:18:15 -04:00
83ba27244e Update README.md 2026-04-10 17:25:59 +00:00
e54a2c3d09 Merge pull request 'chore: Configure Renovate' (#3) from renovate/configure into main
Reviewed-on: #3
2026-03-24 22:52:45 +00:00
bc3ad033e5 Add renovate.json 2026-03-10 17:52:13 +00:00
fa23e06a56 chore: publish 0.6.0+4.6.1 release 2026-01-23 11:16:53 -05:00
311b99e322 Update README.md 2026-01-23 16:08:49 +00:00
328dfcd2f5 Merge pull request 'cryptosecret' (#2) from cryptosecret into main
Reviewed-on: #2
Issue: #1
2026-01-23 16:02:23 +00:00
c6de93d2da bugfix, tested working 2025-10-29 16:11:24 -04:00
b3e74fa7ef generate and manage CRYPTO_KEY outside of abra 2025-10-29 15:03:23 -04:00
59171ec812 chore: publish 0.5.0+4.6.1 release
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-10-29 13:55:11 -04:00
c9644d39f2 update readme
All checks were successful
continuous-integration/drone/push Build is passing
2025-10-29 13:44:44 -04:00
09e2b37332 add gen_key command 2025-10-29 13:18:37 -04:00
72d3dbe370 Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
2025-10-29 16:40:13 +00:00
ea702f7b7f chore: publish 0.4.3+4.6.1 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-10-28 13:29:41 -04:00
782f786380 Update compose.yml
All checks were successful
continuous-integration/drone/push Build is passing
2025-10-28 17:23:29 +00:00
487a20deed bump ver in compose.yml
All checks were successful
continuous-integration/drone/push Build is passing
2025-10-28 17:21:19 +00:00
bae2bc05b0 chore: publish 0.4.3+4.5.1 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-10-21 15:02:22 -04:00
11f8614841 Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
2025-10-21 18:56:06 +00:00
07a6fdedc9 Update README.md
Some checks failed
continuous-integration/drone/push Build is failing
2025-10-21 18:54:01 +00:00
bcfb6bfd35 Update compose.yml
Some checks failed
continuous-integration/drone/push Build is failing
2025-10-21 18:53:38 +00:00
a8167754ba update readme instructions
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-02 14:49:20 -04:00
1fb3025d75 update readme, fix create tables command
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-02 14:44:50 -04:00
5a7febd5f3 add pg backup version to .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-02 14:41:16 -04:00
d519279568 smh
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-02 14:40:32 -04:00
9adf6bbbd6 update .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-02 14:39:34 -04:00
8822497e43 remove quotes from drone.yml env variables
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-02 14:38:11 -04:00
c1b1a6c0d7 Update README.md
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-02 18:36:42 +00:00
b088285584 chore: publish 0.4.3+4.0.0 release
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
2025-07-02 14:31:27 -04:00
5150b0ea68 add PG_BACKUP_VERSION to abra.sh
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-02 14:30:09 -04:00
27fbd8db7d chore: publish 0.4.2+4.0.0 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-06-19 19:30:52 -04:00
aba1a4fffb quotes around backup bot label values
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-19 19:26:23 -04:00
2a6e0d8183 put quotes around key version value
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-19 19:24:25 -04:00
eac106922d update readme metadata
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-19 19:23:26 -04:00
db35f14d19 include basic backup labels for liberaforms container 2025-06-19 19:23:15 -04:00
f3b4e2a70c prettier 2025-06-19 19:18:44 -04:00
f48996884e move remote storage option to compose file until s3 is officially supported by recipe 2025-06-19 19:15:14 -04:00
938aa37b73 update postgres backup dir 2025-06-19 19:14:56 -04:00
da704e31f9 add pg backup script 2025-06-19 19:10:44 -04:00
79cb1a9d7f fix syntax issues drone.yml
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-19 16:38:16 -04:00
0d5c6ad614 add proper healthcheck to liberaforms container
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-19 16:36:26 -04:00
27351dc8f9 add internal network to drone.yml 2025-06-19 16:29:49 -04:00
d90c5dd197 update readme meta 2025-06-19 16:28:26 -04:00
1a36713edd chore: publish 0.1.1+4.0.0 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-06-19 16:24:20 -04:00
638901bac1 include tests and activate pipeline
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-19 16:23:04 -04:00
16 changed files with 210 additions and 82 deletions

View File

@ -6,17 +6,55 @@ steps:
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: example_com # UPDATE ME
stack: liberaforms
generate_secrets: true
purge: true
deploy_key:
from_secret: drone_ssh_swarm_test
networks:
- proxy
- internal
compose: "compose.yml"
environment:
DOMAIN: example.swarm-test.autonomic.zone # UPDATE ME
STACK_NAME: example_com # UPDATE ME
DOMAIN: liberaforms.swarm-test.autonomic.zone
STACK_NAME: liberaforms
LETS_ENCRYPT_ENV: production
ENABLE_LDAP: False
FLASK_DEBUG: False
FLASK_CONFIG: production
DB_HOST: db
DB_USER: liberaforms
DB_PASSWORD_FILE: /run/secrets/db_password
DB_NAME: liberaforms
BASE_URL: https://${DOMAIN}
ROOT_USER: ${ADMIN_USER}
TMP_DIR: /tmp
SECRET_KEY_FILE: /run/secrets/secret_key
CRYPTO_KEY_FILE: /run/secrets/crypto_key
SESSION_TYPE: filesystem
LOG_LEVEL: INFO
LOG_DIR: /app/logs
GUNICORN_WORKERS: ${GUNICORN_WORKERS:-3}
SECRET_SECRET_KEY_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
SECRET_CRYPTO_KEY_VERSION: v1
ENTRYPOINT_VERSION: v2
NGINX_CONFIG_VERSION: v1
PG_BACKUP_VERSION: v1
TYPE: liberaforms
ADMIN_USER: you@example.com
DEFAULT_LANGUAGE: en
E2EE_MODE: ENABLED_BY_DEFAULT
TOKEN_EXPIRATION: 604800
DEFAULT_TIMEZONE: America/New_York
ENABLE_RSS_FEED: True
ENABLE_PROMETHEUS_METRICS: False
ENABLE_UPLOADS: True
ENABLE_REMOTE_STORAGE: False
TOTAL_UPLOADS_LIMIT: 1 GB
DEFAULT_USER_UPLOADS_LIMIT: 50 MB
MAX_MEDIA_SIZE: 512000
MAX_ATTACHMENT_SIZE: 1572864
trigger:
branch:
- main
@ -32,7 +70,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/recipes-catalogue-json
trigger:
event: tag

View File

@ -1,42 +1,38 @@
TYPE=liberaforms
DOMAIN=liberaforms.example.com
LETS_ENCRYPT_ENV=production
SECRET_SECRET_KEY_VERSION = v1
SECRET_DB_PASSWORD_VERSION = v1
SECRET_CRYPTO_KEY_VERSION= v1
ADMIN_USER = 'you@example.com'
DEFAULT_LANGUAGE = 'en' # Options: en, eu, es, ca, cs, de, fr, gl, ru, ta
E2EE_MODE=ENABLED_BY_DEFAULT # Options: AVAILABLE, DISABLED, REQUIRED, ENABLED_BY_DEFAULT
TOKEN_EXPIRATION = 604800 # Maximum valid age (in seconds) for password resets, invitations, etc.
# Secrets
SECRET_SECRET_KEY_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
CRYPTO_KEY_VERSION=v1 # This secret is managed in the entrypoint, not as a docker secret
# Administration
ADMIN_USER='you@example.com'
DEFAULT_LANGUAGE='en'
DEFAULT_TIMEZONE="America/New_York"
ENABLE_RSS_FEED=True
ENABLE_PROMETHEUS_METRICS=False
#GUNICORN_WORKERS= # Advanced option based on the specs of your server, defaults to 3
#ALERT_MAILS = ["your_email_address", "another_email_address"] # Optional. Recieve Internal Server 500 errors. Good for debugging.
###############
### Uploads ###
###############
# Security
E2EE_MODE=ENABLED_BY_DEFAULT
TOKEN_EXPIRATION=604800 # 7 days in seconds
# File Uploads
ENABLE_UPLOADS=True
ENABLE_REMOTE_STORAGE=False
TOTAL_UPLOADS_LIMIT="1 GB" # site-wide limit
TOTAL_UPLOADS_LIMIT="1 GB"
DEFAULT_USER_UPLOADS_LIMIT="50 MB"
MAX_MEDIA_SIZE=512000 # In Bytes
MAX_ATTACHMENT_SIZE=1572864 # In Bytes
MAX_MEDIA_SIZE=512000 # 500 KB
MAX_ATTACHMENT_SIZE=1572864 # 1.5 MB
###############
#### LDAP #####
###############
# Performance and Monitoring
ENABLE_PROMETHEUS_METRICS=False
#GUNICORN_WORKERS= # Default: 3
#LDAP_SERVER: ldap://localhost
# Email notifications
#ALERT_MAILS=["your_email_address", "another_email_address"]
# LDAP
#LDAP_SERVER=ldap://localhost
#LDAP_BIND_ACCOUNT="cn=nobody,dc=example,dc=com"
#LDAP_USER_DN_LIST=["uid=%uid,ou=users,o=company,dc=example,dc=com"]
#LDAP_SEARCH_BASE_DN="o=company,dc=example,dc=com"

View File

@ -4,22 +4,32 @@
<!-- metadata -->
* **Category**: Apps
* **Status**: wip
* **Image**: [`liberaforms`](https://fung.uy/mycosystems/-/packages/container/liberaforms/), 1
* **Healthcheck**: Yes
* **Backups**: No
* **Email**: 1
* **Tests**: No
* **SSO**: 3
- **Category**: Apps
- **Status**: 2
- **Image**: [`liberaforms`](https://fung.uy/mycosystems/-/packages/container/liberaforms/), 1
- **Healthcheck**: Yes
- **Backups**: Yes
- **Email**: 1
- **Tests**: Yes
- **SSO**: 3
<!-- endmetadata -->
## Quick start
* `abra app new liberaforms --secrets`
* `abra app config <domain-name>`
* `abra app deploy <domain-name>`
* Create tables `abra app cmd <domain-name> app setup_db` more info in [liberaforms docs](https://gitlab.com/liberaforms/liberaforms/-/blob/main/docs/docker.md?ref_type=heads#create-the-database)
- `abra app new liberaforms --secrets`
- Set an admin email address
- `abra app config <domain-name>`
- Deploy
> note, the deployment will need to be interuppted to run **Create tables**
- `abra app deploy <domain-name>`
- *Note: The deploy may hang, if so, perform the next step in another terminal and wait for the deploy to complete.*
- Create tables
- `abra app cmd <domain-name> app setup_db`
> more info in [liberaforms docs](https://codeberg.org/LiberaForms/server/src/branch/main/docs/docker.md#create-the-database)
## Admin account setup
Once liberaforms is deployed, go to the login screen by clicking the text in the top right. Next, click "forgot password" now you can fill in the email you set as your admin email and you will be prompted to set a password.
For more, see [`docs.liberaforms.org`](https://docs.liberaforms.org/).

View File

@ -1,7 +1,8 @@
#!/bin/bash
export ENTRYPOINT_VERSION=v2
export NGINX_CONFIG_VERSION=v1
export NGINX_CONFIG_VERSION=v2
export PG_BACKUP_VERSION=v1
file_env() {
local var="$1"
@ -39,4 +40,4 @@ setup_db() {
fi
echo "Database setup complete. <3"
}
}

View File

@ -4,42 +4,19 @@ version: "3.8"
services:
app:
image: nginx:stable
networks:
- internal
- proxy
volumes:
- uploads:/liberaforms/uploads:ro
- static:/liberaforms/static:ro
configs:
- source: nginx_conf
mode: 555
target: /etc/nginx/conf.d/default.conf
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=wip"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost" ]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
forms:
image: fung.uy/mycosystems/liberaforms:v4.0.0
image: fung.uy/mycosystems/liberaforms:v4.7.0
configs:
- source: entrypoint
mode: 555
target: /custom-entrypoint.sh
entrypoint: /custom-entrypoint.sh
command: "/usr/bin/supervisord -n"
healthcheck:
test: ["CMD", "python", "-c", "import requests; print(requests.get('http://localhost:5000/').status_code)"]
timeout: 45s
interval: 10s
retries: 10
start_period: 1m
environment:
- ENABLE_LDAP=False
- FLASK_DEBUG=False
@ -49,10 +26,10 @@ services:
- DB_PASSWORD_FILE=/run/secrets/db_password
- DB_NAME=liberaforms
- BASE_URL=https://${DOMAIN}
- SERVER_NAME=${DOMAIN}
- ROOT_USER=${ADMIN_USER}
- TMP_DIR=/tmp
- SECRET_KEY_FILE=/run/secrets/secret_key
- CRYPTO_KEY_FILE=/run/secrets/crypto_key
- SESSION_TYPE=filesystem
- LOG_LEVEL=INFO
- LOG_DIR=/app/logs
@ -64,7 +41,7 @@ services:
- ENABLE_UPLOADS
- TOTAL_UPLOADS_LIMIT
- DEFAULT_USER_UPLOADS_LIMIT
- ENABLE_REMOTE_STORAGE
- ENABLE_REMOTE_STORAGE=False
- MAX_MEDIA_SIZE
- MAX_ATTACHMENT_SIZE
- ENABLE_PROMETHEUS_METRICS
@ -79,19 +56,63 @@ services:
- LDAP_MAIL_ATTRIB
- LDAP_RECOVER_PASSWD_URL
- E2EE_MODE
- CRYPTO_KEY_VERSION
deploy:
labels:
- "coop-cloud.${STACK_NAME}.version=1.0.1+v4.7.0"
- "backupbot.backup=true"
- "backupbot.backup.volumes.uploads=true"
- "backupbot.backup.volumes.log=false"
- "backupbot.backup.volumes.static=false"
volumes:
- uploads:/app/uploads
- log:/app/logs
- static:/app/liberaforms/static
- cryptokey:/cryptokey
secrets:
- db_password
- secret_key
- crypto_key
networks:
internal:
aliases:
- "${STACK_NAME}-app"
proxy:
image: nginx:stable
networks:
- internal
- proxy
volumes:
- uploads:/liberaforms/uploads:ro
- static:/liberaforms/static:ro
environment:
- STACK_NAME
configs:
- source: nginx_conf
mode: 555
target: /etc/nginx/conf.d/default.conf
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost" ]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
db:
image: postgres:17
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "liberaforms" ]
timeout: 45s
@ -101,6 +122,11 @@ services:
POSTGRES_USER: liberaforms
POSTGRES_DB: liberaforms
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
deploy:
labels:
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.db.path: "backup.sql"
backupbot.restore.post-hook: "/pg_backup.sh restore"
volumes:
- db:/var/lib/postgresql/data
secrets:
@ -115,15 +141,13 @@ secrets:
secret_key:
external: true
name: ${STACK_NAME}_secret_key_${SECRET_SECRET_KEY_VERSION}
crypto_key:
external: true
name: ${STACK_NAME}_crypto_key_${SECRET_CRYPTO_KEY_VERSION}
volumes:
uploads:
static:
log:
db:
cryptokey:
networks:
@ -139,3 +163,7 @@ configs:
nginx_conf:
name: ${STACK_NAME}_nginx_conf_${NGINX_CONFIG_VERSION}
file: nginx.conf
template_driver: golang
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh

View File

@ -25,8 +25,12 @@ file_env() {
}
file_env "DB_PASSWORD"
file_env "CRYPTO_KEY"
file_env "SECRET_KEY"
file_env "LDAP_BIND_PASSWORD"
if [ ! -f "/cryptokey/$CRYPTO_KEY_VERSION" ]; then
flask cryptokey create > /cryptokey/$CRYPTO_KEY_VERSION
fi
export CRYPTO_KEY=`cat /cryptokey/$CRYPTO_KEY_VERSION`
/usr/bin/supervisord -n

View File

@ -2,12 +2,16 @@ server {
listen 80;
server_name localhost;
resolver 127.0.0.11 valid=10s;
client_max_body_size 2m;
add_header Referrer-Policy "origin-when-cross-origin";
add_header X-Content-Type-Options nosniff;
location / {
set $upstream_app http://{{ env "STACK_NAME" }}-app:5000;
location /static/ {
alias /liberaforms/static/;
}
@ -23,7 +27,7 @@ server {
location /metrics {
return 404;
}
proxy_pass http://forms:5000;
proxy_pass $upstream_app;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;

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.1.1+4.0.0 Normal file
View File

@ -0,0 +1 @@
add ci testing and activate drone ci pipeline

1
release/0.4.2+4.0.0 Normal file
View File

@ -0,0 +1 @@
This release adds a proper healthcheck to the Liberaforms service and Backupbot labels for liberaforms uploads and Postgres.

1
release/0.4.3+4.0.0 Normal file
View File

@ -0,0 +1 @@
minor patch, no breaking changes expected.

1
release/0.4.3+4.5.1 Normal file
View File

@ -0,0 +1 @@
bump liberaforms container to 4.5.1

1
release/0.4.3+4.6.1 Normal file
View File

@ -0,0 +1 @@
bump liberaforms container to 4.6.1

1
release/0.5.0+4.6.1 Normal file
View File

@ -0,0 +1 @@
add key generation steps to support file uploads in forms.

1
release/1.0.0+v4.7.0 Normal file
View File

@ -0,0 +1 @@
Some release testing has been conducted but this latest version changes the compose layout, please take a backup before proceeding.

6
renovate.json Normal file
View File

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