Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f0a5900bf |
@@ -65,12 +65,3 @@ OIDC_AUTH_REQUEST_EXTRA_PARAMS='{"acr_values": "eidas1"}'
|
|||||||
LOGGING_LEVEL_HANDLERS_CONSOLE=INFO
|
LOGGING_LEVEL_HANDLERS_CONSOLE=INFO
|
||||||
LOGGING_LEVEL_LOGGERS_ROOT=INFO
|
LOGGING_LEVEL_LOGGERS_ROOT=INFO
|
||||||
LOGGING_LEVEL_LOGGERS_APP=INFO
|
LOGGING_LEVEL_LOGGERS_APP=INFO
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# WOPI SCHEDULING
|
|
||||||
##############################################################################
|
|
||||||
# Celery Beat crontab for the WOPI configuration task (default: daily at 3:00 AM)
|
|
||||||
#WOPI_CONFIGURATION_CRONTAB_MINUTE=0
|
|
||||||
#WOPI_CONFIGURATION_CRONTAB_HOUR=3
|
|
||||||
#WOPI_CONFIGURATION_CRONTAB_DAY_OF_MONTH=*
|
|
||||||
#WOPI_CONFIGURATION_CRONTAB_MONTH_OF_YEAR=*
|
|
||||||
|
|||||||
@@ -11,12 +11,5 @@ set -e
|
|||||||
|
|
||||||
# if not in "env" mode, then execute the original entrypoint and command
|
# if not in "env" mode, then execute the original entrypoint and command
|
||||||
if [ ! "$1" = "-e" ]; then
|
if [ ! "$1" = "-e" ]; then
|
||||||
# Run WOPI configuration on startup if enabled (celery worker service only).
|
|
||||||
# This ensures WOPI clients are configured immediately after each deploy,
|
|
||||||
# rather than waiting for the next celery-beat cron tick (default: 3 AM).
|
|
||||||
if [ "${RUN_WOPI_ON_STARTUP:-}" = "true" ]; then
|
|
||||||
echo "🐳(entrypoint) running WOPI configuration on startup..."
|
|
||||||
python manage.py trigger_wopi_configuration || echo "⚠ WOPI configuration failed (non-fatal, will retry on schedule)"
|
|
||||||
fi
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
fi
|
fi
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
# Set any config versions here
|
# Set any config versions here
|
||||||
# Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs
|
# Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs
|
||||||
export ABRA_ENTRYPOINT_VERSION=v7
|
export ABRA_ENTRYPOINT_VERSION=v5
|
||||||
export NGINX_CONF_VERSION=v6
|
export NGINX_CONF_VERSION=v6
|
||||||
export ONLYOFFICE_CONF_VERSION=v2
|
export ONLYOFFICE_CONF_VERSION=v2
|
||||||
export PG_BACKUP_VERSION=v3
|
export PG_BACKUP_VERSION=v3
|
||||||
|
export SCHEDULE_WOPI_VERSION=v1
|
||||||
|
|
||||||
environment() {
|
environment() {
|
||||||
# this exports all the secrets as environment variables
|
# this exports all the secrets as environment variables
|
||||||
|
|||||||
+27
-22
@@ -66,11 +66,6 @@ x-common-env: &common-env
|
|||||||
WOPI_COLLABORA_DISCOVERY_URL: "https://${COLLABORA_DOMAIN}/hosting/discovery"
|
WOPI_COLLABORA_DISCOVERY_URL: "https://${COLLABORA_DOMAIN}/hosting/discovery"
|
||||||
WOPI_ONLYOFFICE_DISCOVERY_URL: "https://${ONLY_OFFICE_DOMAIN}/hosting/discovery"
|
WOPI_ONLYOFFICE_DISCOVERY_URL: "https://${ONLY_OFFICE_DOMAIN}/hosting/discovery"
|
||||||
WOPI_SRC_BASE_URL: "https://${DOMAIN}"
|
WOPI_SRC_BASE_URL: "https://${DOMAIN}"
|
||||||
# WOPI scheduling (Celery Beat crontab for WOPI configuration task)
|
|
||||||
WOPI_CONFIGURATION_CRONTAB_MINUTE: ${WOPI_CONFIGURATION_CRONTAB_MINUTE:-0}
|
|
||||||
WOPI_CONFIGURATION_CRONTAB_HOUR: ${WOPI_CONFIGURATION_CRONTAB_HOUR:-3}
|
|
||||||
WOPI_CONFIGURATION_CRONTAB_DAY_OF_MONTH: ${WOPI_CONFIGURATION_CRONTAB_DAY_OF_MONTH:-*}
|
|
||||||
WOPI_CONFIGURATION_CRONTAB_MONTH_OF_YEAR: ${WOPI_CONFIGURATION_CRONTAB_MONTH_OF_YEAR:-*}
|
|
||||||
|
|
||||||
x-postgres-env: &postgres-env
|
x-postgres-env: &postgres-env
|
||||||
# Postgresql db container configuration
|
# Postgresql db container configuration
|
||||||
@@ -92,14 +87,14 @@ services:
|
|||||||
|
|
||||||
app:
|
app:
|
||||||
user: "${DOCKER_USER:-1000}"
|
user: "${DOCKER_USER:-1000}"
|
||||||
image: lasuite/drive-frontend:v0.12.0
|
image: lasuite/drive-frontend:v0.11.1
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
deploy:
|
deploy:
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=false"
|
- "traefik.enable=false"
|
||||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=0.6.0+v0.12.0"
|
- "coop-cloud.${STACK_NAME}.version=0.2.7+v0.11.1"
|
||||||
environment:
|
environment:
|
||||||
<<: [ *common-env ]
|
<<: [ *common-env ]
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -113,7 +108,7 @@ services:
|
|||||||
|
|
||||||
backend:
|
backend:
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
image: lasuite/drive-backend:v0.12.0
|
image: lasuite/drive-backend:v0.11.1
|
||||||
command: [ "gunicorn", "-c", "/usr/local/etc/gunicorn/drive.py", "drive.wsgi:application" ]
|
command: [ "gunicorn", "-c", "/usr/local/etc/gunicorn/drive.py", "drive.wsgi:application" ]
|
||||||
entrypoint: [ "/abra-entrypoint.sh", "/usr/local/bin/entrypoint" ]
|
entrypoint: [ "/abra-entrypoint.sh", "/usr/local/bin/entrypoint" ]
|
||||||
environment:
|
environment:
|
||||||
@@ -135,20 +130,26 @@ services:
|
|||||||
- postgres_p
|
- postgres_p
|
||||||
- email_pass
|
- email_pass
|
||||||
|
|
||||||
celery:
|
# this may be unecessary once the PR is merged to use celery beat
|
||||||
|
# but this is a workaround for now https://github.com/suitenumerique/drive/issues/484
|
||||||
|
scheduler:
|
||||||
|
image: lasuite/drive-backend:v0.11.1
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
image: lasuite/drive-backend:v0.12.0
|
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
command: [ "celery", "-A", "drive.celery_app", "worker", "-l", "INFO" ]
|
depends_on:
|
||||||
entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"]
|
- db
|
||||||
|
- redis
|
||||||
environment:
|
environment:
|
||||||
<<: [*common-env, *postgres-env]
|
<<: [ *common-env, *postgres-env ]
|
||||||
RUN_WOPI_ON_STARTUP: "true"
|
|
||||||
configs:
|
configs:
|
||||||
|
- source: schedule_wopi
|
||||||
|
target: /app/schedule_wopi.sh
|
||||||
|
mode: 0755
|
||||||
- source: abra_entrypoint
|
- source: abra_entrypoint
|
||||||
target: /abra-entrypoint.sh
|
target: /abra-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
|
entrypoint: ["/app/schedule_wopi.sh"]
|
||||||
secrets:
|
secrets:
|
||||||
- django_sk
|
- django_sk
|
||||||
- django_sp
|
- django_sp
|
||||||
@@ -157,12 +158,12 @@ services:
|
|||||||
- postgres_p
|
- postgres_p
|
||||||
- email_pass
|
- email_pass
|
||||||
|
|
||||||
celery-beat:
|
celery:
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
image: lasuite/drive-backend:v0.12.0
|
image: lasuite/drive-backend:v0.11.1
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
command: [ "celery", "-A", "drive.celery_app", "beat", "-l", "INFO", "--schedule", "/tmp/celerybeat-schedule" ]
|
command: [ "celery", "-A", "drive.celery_app", "worker", "-l", "INFO" ]
|
||||||
entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"]
|
entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"]
|
||||||
environment:
|
environment:
|
||||||
<<: [*common-env, *postgres-env]
|
<<: [*common-env, *postgres-env]
|
||||||
@@ -179,17 +180,17 @@ services:
|
|||||||
- email_pass
|
- email_pass
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: pgautoupgrade/pgautoupgrade:18-debian
|
image: postgres:16
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pg_isready", "-q", "-U", "drive", "-d", "drive"]
|
test: ["CMD", "pg_isready", "-q", "-U", "docs", "-d", "docs"]
|
||||||
interval: 1s
|
interval: 1s
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
retries: 300
|
retries: 300
|
||||||
environment:
|
environment:
|
||||||
<<: *postgres-env
|
<<: *postgres-env
|
||||||
PGDATA: /var/lib/postgresql/data/pgdata
|
PGDATA: var/lib/postgresql/data/pgdata
|
||||||
volumes:
|
volumes:
|
||||||
- postgres:/var/lib/postgresql/data/pgdata
|
- postgres:/var/lib/postgresql/data/pgdata
|
||||||
deploy:
|
deploy:
|
||||||
@@ -206,7 +207,7 @@ services:
|
|||||||
- postgres_p
|
- postgres_p
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:8
|
image: redis:5
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
@@ -349,7 +350,7 @@ services:
|
|||||||
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: nginx:1.29
|
image: nginx:1.25
|
||||||
configs:
|
configs:
|
||||||
- source: nginx_conf
|
- source: nginx_conf
|
||||||
target: /etc/nginx/conf.d/default.conf
|
target: /etc/nginx/conf.d/default.conf
|
||||||
@@ -388,6 +389,10 @@ configs:
|
|||||||
pg_backup:
|
pg_backup:
|
||||||
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
|
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
|
||||||
file: pg_backup.sh
|
file: pg_backup.sh
|
||||||
|
schedule_wopi:
|
||||||
|
name: ${STACK_NAME}_schedule_wopi_${SCHEDULE_WOPI_VERSION}
|
||||||
|
file: schedule_wopi.sh
|
||||||
|
template_driver: golang
|
||||||
abra_entrypoint:
|
abra_entrypoint:
|
||||||
name: ${STACK_NAME}_entrypoint_${ABRA_ENTRYPOINT_VERSION}
|
name: ${STACK_NAME}_entrypoint_${ABRA_ENTRYPOINT_VERSION}
|
||||||
file: abra-entrypoint.sh
|
file: abra-entrypoint.sh
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Switched the database image from postgres:16 to pgautoupgrade/pgautoupgrade:18-debian. This enables automatic PostgreSQL major version upgrades. No action required from the operator — the upgrade from PostgreSQL 16 to 18 is handled automatically by the pgautoupgrade image on first start.
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
echo "Running WOPI job at $(date)"
|
||||||
|
# source env
|
||||||
|
. /abra-entrypoint.sh -e
|
||||||
|
# run python command
|
||||||
|
python manage.py trigger_wopi_configuration
|
||||||
|
echo "++ completed wopi trigger. now sleeping."
|
||||||
|
# wait before next run
|
||||||
|
sleep 1800 # 1800 seconds = 30 minutes
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user