Compare commits

...

19 Commits

Author SHA1 Message Date
notplants e39f0e8ca3 chore: publish 0.11.0+v0.19.0 release
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
2026-06-23 16:02:40 -04:00
notplants d9adb88d40 Merge pull request 'Add auto-migrations to lasuite-drive' (#10) from pr-20260623-193109 into main
continuous-integration/drone/push Build is failing
Reviewed-on: #10
2026-06-23 19:57:53 +00:00
notplants 9e4c194783 create minio bucket automatically on startup (minio-initialize.sh)
continuous-integration/drone/pr Build is failing
Replace the one-shot minio-createbuckets service (which required a
manual 'abra app restart minio-createbuckets' that appeared to hang)
with a minio-initialize.sh config, ported from lasuite-docs. The minio
service entrypoint runs it in the background before starting minio; it
waits for minio to be ready and idempotently creates the
drive-media-storage bucket with versioning. Manual trigger:
'abra app cmd minio minio_initialize'.
2026-06-23 19:26:19 +00:00
notplants 0b64135f98 run migrations automatically on backend startup (AUTO_MIGRATIONS)
Add a migrate.sh config (ported from lasuite-docs) that the backend
entrypoint runs when AUTO_MIGRATIONS=true (default). It loads secrets,
waits for the DB, and idempotently applies pending migrations via
'migrate --check' then 'migrate --noinput'. The manual 'abra app cmd
backend migrate' now delegates to the same script.
2026-06-23 19:13:39 +00:00
trav d3c3682936 chore: publish 0.10.1+v0.19.0 release
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
2026-06-22 14:54:08 -04:00
trav a06114d855 Merge pull request 'chore: upgrade web (nginx) to 1.31.2' (#9) from upgrade-0e3daef into main
continuous-integration/drone/push Build is failing
Reviewed-on: #9
2026-06-22 18:46:47 +00:00
autonomic-bot 0e3daeffec chore: upgrade web (nginx) to 1.31.2
continuous-integration/drone/pr Build is failing
2026-06-19 02:58:04 +00:00
trav 717205a117 Merge pull request 'chore: upgrade to v0.19.0' (#8) from upgrade-6771622 into main
continuous-integration/drone/push Build is failing
Reviewed-on: #8
2026-06-15 17:12:34 +00:00
autonomic-bot 6771622bae chore: upgrade to v0.19.0
continuous-integration/drone/pr Build is failing
continuous-integration/drone/tag Build is passing
2026-06-12 03:32:50 +00:00
trav d5cb5c898f Merge pull request 'chore: upgrade to 0.9.0+v0.18.0' (#6) from upgrade-0.9.0+v0.18.0 into main
continuous-integration/drone/push Build is failing
Reviewed-on: #6
2026-06-08 17:32:44 +00:00
autonomic-bot ffa7d585af chore: upgrade to 0.9.0+v0.18.0
continuous-integration/drone/pr Build is failing
continuous-integration/drone/tag Build encountered an error
2026-06-05 02:50:51 +00:00
notplants f4135d7820 bump to 0.8.0+v0.18.0
- drive-frontend/backend: v0.12.0 → v0.18.0
- collabora/code: 25.04.9.1.1 → 25.04.9.4.1
- onlyoffice/documentserver-de: 9.2 → 9.3.1.2
- redis: 8 → 8.6.3 (pinned)
- nginx: 1.29 → 1.30.0
- add optional env vars: DJANGO_EMAIL_URL_APP, DJANGO_CSRF_TRUSTED_ORIGINS, DATA_UPLOAD_MAX_MEMORY_SIZE
2026-05-11 19:52:46 +00:00
notplants 016728f970 Merge pull request '0.7.1v0.12.0' (#4) from 0.7.1v0.12.0 into main
continuous-integration/drone/push Build is failing
Reviewed-on: #4
2026-02-20 14:22:44 +00:00
notplants 9c4a1f823c bump to 0.7.1+v0.12.0
continuous-integration/drone/pr Build is failing
continuous-integration/drone/tag Build is passing
2026-02-20 14:20:07 +00:00
notplants 0411553e36 add minio backup label and fix pg restore path 2026-02-20 14:19:59 +00:00
notplants 7146f3e8be fix release note: consistent placeholder
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
2026-02-18 16:57:01 +00:00
notplants 306914f9d8 fix release note: use placeholder domain 2026-02-18 16:56:37 +00:00
notplants c408893d5f fix release note: lowercase secret name 2026-02-18 16:56:08 +00:00
notplants 196d20a92e bump to 0.7.0+v0.12.0 2026-02-18 16:54:43 +00:00
8 changed files with 111 additions and 41 deletions
+12
View File
@@ -68,6 +68,12 @@ LOGGING_LEVEL_HANDLERS_CONSOLE=INFO
LOGGING_LEVEL_LOGGERS_ROOT=INFO
LOGGING_LEVEL_LOGGERS_APP=INFO
##############################################################################
# MIGRATIONS
##############################################################################
# Set to false to disable automatic migrations on backend startup
# AUTO_MIGRATIONS=true
##############################################################################
# COLLABORA ADMIN PANEL
##############################################################################
@@ -75,6 +81,12 @@ LOGGING_LEVEL_LOGGERS_APP=INFO
# Password is managed via Docker secret 'collabora_p'
#COLLABORA_ADMIN_USERNAME=admin
##############################################################################
# BACKUPS
##############################################################################
# Set to false to disable backup-bot labels (default: true)
#ENABLE_BACKUPS=true
##############################################################################
# WOPI SCHEDULING
##############################################################################
+3 -2
View File
@@ -27,11 +27,12 @@ This recipe requires four domains. One domain for drive, and one for minio which
* `abra app config <app-name>`
- make sure to set MINIO_DOMAIN, COLLABORA_DOMAIN, ONLY_OFFICE_DOMAIN to the domains you set up for each.
* `abra app deploy <app-name>`
* `abra app cmd <app-name> backend migrate` # creates database tables
* `abra app restart <app-name> minio-createbuckets` (Note: this will appear to fail, but probably worked! Check `abra app logs <app-name> minio-createbuckets`)
You should then be able to visit the landing page of your app, but not yet to login. To login, you need to deploy and integrate single sign on (described below in the "Configure Authentication" section).
* Migrations run automatically on backend startup. To trigger manually: `abra app cmd <app-name> backend migrate`
* Minio buckets are created automatically on first deploy. To manually trigger: `abra app cmd <app-name> minio minio_initialize`
Wopi discovery is supposed to happen automatically, but if collabora/onlyoffice are not connecting, you can try running:
* `abra app cmd <app-name> backend trigger_wopi` # connects only office & collabora (if they stop working, try running this again)
+8 -3
View File
@@ -3,7 +3,9 @@
export ABRA_ENTRYPOINT_VERSION=v11
export NGINX_CONF_VERSION=v6
export ONLYOFFICE_CONF_VERSION=v2
export PG_BACKUP_VERSION=v3
export PG_BACKUP_VERSION=v4
export MIGRATE_VERSION=v1
export MINIO_INITIALIZE_VERSION=v1
environment() {
# this exports all the secrets as environment variables
@@ -11,8 +13,11 @@ environment() {
}
migrate() {
environment
python manage.py migrate --noinput
/migrate.sh
}
minio_initialize() {
/minio-initialize.sh
}
trigger_wopi() {
+30 -33
View File
@@ -27,6 +27,9 @@ x-common-env: &common-env
DJANGO_EMAIL_USE_SSL:
DJANGO_EMAIL_USE_TLS:
DJANGO_EMAIL_FROM:
DJANGO_EMAIL_URL_APP:
DJANGO_CSRF_TRUSTED_ORIGINS:
DATA_UPLOAD_MAX_MEMORY_SIZE:
# Backend url
DRIVE_BASE_URL: "https://${DOMAIN}"
# Media
@@ -92,14 +95,14 @@ services:
app:
user: "${DOCKER_USER:-1000}"
image: lasuite/drive-frontend:v0.12.0
image: lasuite/drive-frontend:v0.19.0
networks:
- backend
deploy:
labels:
- "traefik.enable=false"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
- "coop-cloud.${STACK_NAME}.version=0.6.0+v0.12.0"
- "coop-cloud.${STACK_NAME}.version=0.11.0+v0.19.0"
environment:
<<: [ *common-env ]
healthcheck:
@@ -113,11 +116,13 @@ services:
backend:
user: ${DOCKER_USER:-1000}
image: lasuite/drive-backend:v0.12.0
image: lasuite/drive-backend:v0.19.0
command: [ "gunicorn", "-c", "/usr/local/etc/gunicorn/drive.py", "drive.wsgi:application" ]
entrypoint: [ "/abra-entrypoint.sh", "/usr/local/bin/entrypoint" ]
entrypoint: >
sh -c "if [ \"$$AUTO_MIGRATIONS\" = \"true\" ]; then /migrate.sh; fi && exec /abra-entrypoint.sh /usr/local/bin/entrypoint \"$$@\"" --
environment:
<<: [ *common-env, *postgres-env ]
AUTO_MIGRATIONS: "${AUTO_MIGRATIONS:-true}"
networks:
- backend
depends_on:
@@ -126,6 +131,9 @@ services:
- source: abra_entrypoint
target: /abra-entrypoint.sh
mode: 0555
- source: migrate
target: /migrate.sh
mode: 0555
secrets:
- django_sk
- django_sp
@@ -137,7 +145,7 @@ services:
celery:
user: ${DOCKER_USER:-1000}
image: lasuite/drive-backend:v0.12.0
image: lasuite/drive-backend:v0.19.0
networks:
- backend
command: [ "celery", "-A", "drive.celery_app", "worker", "-l", "INFO" ]
@@ -159,7 +167,7 @@ services:
celery-beat:
user: ${DOCKER_USER:-1000}
image: lasuite/drive-backend:v0.12.0
image: lasuite/drive-backend:v0.19.0
networks:
- backend
command: [ "celery", "-A", "drive.celery_app", "beat", "-l", "INFO", "--schedule", "/tmp/celerybeat-schedule" ]
@@ -206,7 +214,7 @@ services:
- postgres_p
redis:
image: redis:8
image: redis:8.8.0
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
@@ -220,28 +228,6 @@ services:
networks:
- backend
minio-createbuckets:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
environment: *minio-env
entrypoint: >
sh -c "
MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" &&
MINIO_ROOT_PASSWORD=\"\$$(cat /run/secrets/minio_rp)\" &&
/usr/bin/mc alias set drive http://minio:9000 \$${MINIO_ROOT_USER} \"\$${MINIO_ROOT_PASSWORD}\" && \
/usr/bin/mc mb drive/drive-media-storage && \
/usr/bin/mc version enable drive/drive-media-storage && \
exit 0;"
deploy:
mode: replicated
replicas: 0
restart_policy:
condition: none
secrets:
- minio_rp
- minio_ru
networks:
- backend
minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
environment: *minio-env
@@ -254,13 +240,17 @@ services:
- backend
- proxy
command: minio server /data
entrypoint: ["/usr/bin/docker-entrypoint.sh"]
entrypoint: >
sh -c "/minio-initialize.sh & exec /usr/bin/docker-entrypoint.sh \"$$@\"" --
volumes:
- minio:/data
configs:
- source: abra_entrypoint
target: /abra-entrypoint.sh
mode: 0555
- source: minio_initialize
target: /minio-initialize.sh
mode: 0555
secrets:
- minio_rp
- minio_ru
@@ -280,9 +270,10 @@ services:
- "traefik.http.middlewares.${STACK_NAME}_minio-cors.headers.accessControlMaxAge=600"
- "traefik.http.middlewares.${STACK_NAME}_minio-cors.headers.addVaryHeader=true"
- "traefik.http.routers.${STACK_NAME}_minio.middlewares=${STACK_NAME}_minio-cors"
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
collabora:
image: collabora/code:25.04.9.1.1
image: collabora/code:25.04.9.4.1
entrypoint: >
sh -c "
export password=\"$$(cat /run/secrets/collabora_p)\" &&
@@ -320,7 +311,7 @@ services:
- "traefik.http.routers.${STACK_NAME}_collabora.middlewares=${STACK_NAME}_collabora-cors"
onlyoffice:
image: onlyoffice/documentserver-de:9.2
image: onlyoffice/documentserver-de:9.3.1.2
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost/hosting/discovery" ]
interval: 30s
@@ -359,7 +350,7 @@ services:
web:
image: nginx:1.29
image: nginx:1.31.2
configs:
- source: nginx_conf
target: /etc/nginx/conf.d/default.conf
@@ -401,6 +392,12 @@ configs:
abra_entrypoint:
name: ${STACK_NAME}_entrypoint_${ABRA_ENTRYPOINT_VERSION}
file: abra-entrypoint.sh
migrate:
name: ${STACK_NAME}_migrate_${MIGRATE_VERSION}
file: migrate.sh
minio_initialize:
name: ${STACK_NAME}_minio_initialize_${MINIO_INITIALIZE_VERSION}
file: minio-initialize.sh
onlyoffice_conf:
name: ${STACK_NAME}_onlyoffice_conf_${ONLYOFFICE_CONF_VERSION}
file: onlyoffice-config.json.tmpl
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
set -e
# Load secrets into environment
source /abra-entrypoint.sh -e
# Wait for database to be ready (up to 30 seconds)
i=0
while ! python manage.py check --database default 2>/dev/null; do
i=$((i+1))
if [ "$i" -ge 30 ]; then
echo "migrate: timed out waiting for database" >&2
exit 1
fi
sleep 1
done
# Idempotent: skip if no pending migrations
if python manage.py migrate --check > /dev/null 2>&1; then
echo "migrate: no pending migrations, skipping"
exit 0
fi
echo "migrate: applying pending migrations..."
python manage.py migrate --noinput
echo "migrate: done"
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
set -e
# Wait for minio to be ready (up to 60 seconds)
i=0
while ! mc ready local 2>/dev/null; do
i=$((i+1))
if [ "$i" -ge 60 ]; then
echo "minio-initialize: timed out waiting for minio to be ready" >&2
exit 1
fi
sleep 1
done
MINIO_ROOT_USER="$(cat /run/secrets/minio_ru)"
MINIO_ROOT_PASSWORD="$(cat /run/secrets/minio_rp)"
mc alias set drive http://localhost:9000 "${MINIO_ROOT_USER}" "${MINIO_ROOT_PASSWORD}"
# Idempotent: skip if bucket already exists
if mc ls drive/drive-media-storage > /dev/null 2>&1; then
echo "minio-initialize: bucket 'drive-media-storage' already exists, skipping"
exit 0
fi
echo "minio-initialize: creating bucket 'drive-media-storage'..."
mc mb drive/drive-media-storage
mc version enable drive/drive-media-storage
echo "minio-initialize: done"
+1 -1
View File
@@ -10,7 +10,7 @@ function backup {
}
function restore {
cd /var/lib/postgresql/data/
cd /var/lib/postgresql/data/pgdata
restore_config(){
# Restore allowed connections
cat pg_hba.conf.bak > pg_hba.conf
+2 -2
View File
@@ -3,7 +3,7 @@
After upgrading, you must generate the new secret for collabora to work:
```
abra app secret generate lasuite-drive.cctest.autonomic.zone COLLABORA_P v1
abra app config <app-name> # set SECRET_COLLABORA_P_VERSION=v1
abra app secret generate <app-domain> collabora_p v1
abra app config <app-domain> # set SECRET_COLLABORA_P_VERSION=v1
```