diff --git a/abra.sh b/abra.sh index 055ab38..ab108aa 100755 --- a/abra.sh +++ b/abra.sh @@ -1,7 +1,7 @@ # Set any config versions here # Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs export ABRA_ENTRYPOINT_VERSION=v5 -export NGINX_CONF_VERSION=v3 +export NGINX_CONF_VERSION=v4 export PG_BACKUP_VERSION=v3 environment() { diff --git a/compose.yml b/compose.yml index e56c5b9..5542457 100644 --- a/compose.yml +++ b/compose.yml @@ -7,7 +7,7 @@ x-common-env: &common-env DJANGO_CONFIGURATION: Production DJANGO_ALLOWED_HOSTS: "*" # DJANGO_SECRET_KEY supplied via secrets - DJANGO_SETTINGS_MODULE: impress.settings + DJANGO_SETTINGS_MODULE: drive.settings # DJANGO_SUPERUSER_PASSWORD supplied via secrets # Logging # Set to DEBUG level for dev only @@ -28,14 +28,14 @@ x-common-env: &common-env DJANGO_EMAIL_USE_TLS: DJANGO_EMAIL_FROM: # Backend url - IMPRESS_BASE_URL: "https://${DOMAIN}" + DRIVE_BASE_URL: "https://${DOMAIN}" # Media STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage - AWS_S3_ENDPOINT_URL: http://minio:9000 + AWS_S3_ENDPOINT_URL: https://${DOMAIN}/media/ # AWS_S3_ACCESS_KEY_ID supplied via secret (this is same MINIO_ROOT_USER) # AWS_S3_SECRET_ACCESS_KEY supplied via secret (this is same as MINIO_ROOT_PASSWORD) MEDIA_BASE_URL: https://${DOMAIN} - AWS_STORAGE_BUCKET_NAME: docs-media-storage + AWS_STORAGE_BUCKET_NAME: drive-media-storage # OIDC - settings from .env, see .env.sample OIDC_OP_JWKS_ENDPOINT: OIDC_OP_AUTHORIZATION_ENDPOINT: @@ -78,7 +78,7 @@ services: app: user: "${DOCKER_USER:-1000}" - image: drive:frontend-development + image: lasuite/drive-frontend:v0.10.1 # volumes: # - ./src/frontend/:/home/frontend/ # - /home/frontend/node_modules @@ -96,10 +96,14 @@ services: timeout: 30s retries: 20 start_period: 10s + depends_on: + - backend backend: user: ${DOCKER_USER:-1000} - image: drive:backend-development + image: lasuite/drive-backend:v0.10.1 + command: [ "gunicorn", "-c", "/usr/local/etc/gunicorn/drive.py", "drive.wsgi:application" ] + entrypoint: [ "/abra-entrypoint.sh", "/usr/local/bin/entrypoint" ] environment: <<: [ *common-env, *postgres-env ] # volumes: @@ -108,6 +112,8 @@ services: # - /app/.venv networks: - backend + depends_on: + - db configs: - source: abra_entrypoint target: /abra-entrypoint.sh @@ -125,11 +131,11 @@ services: celery: user: ${DOCKER_USER:-1000} - image: drive:backend-development + image: lasuite/drive-backend:v0.10.1 networks: - - default - - lasuite + - backend command: [ "celery", "-A", "drive.celery_app", "worker", "-l", "INFO" ] + entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"] environment: <<: [*common-env, *postgres-env] # volumes: @@ -183,38 +189,14 @@ services: - backend mailcatcher: - image: sj26/mailcatcher:latest + image: sj26/mailcatcher:v0.10.0 networks: - backend -# TODO: remove this -# minio-bootstrap: -# # NOTE: Not started by default, only run with a manual `abra app restart` / `docker service scale` -# image: minio/mc:RELEASE.2025-05-21T01-59-54Z -# environment: *minio-env -# networks: -# - backend -# entrypoint: > -# sh -c " -# MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" && -# MINIO_ROOT_PASSWORD=\"\$$(cat /run/secrets/minio_rp)\" && -# /usr/bin/mc alias set docs http://minio:9000 \$${MINIO_ROOT_USER} \"\$${MINIO_ROOT_PASSWORD}\" && -# /usr/bin/mc mb --ignore-existing docs/docs-media-storage && -# /usr/bin/mc version enable docs/docs-media-storage && -# exit 0" -# deploy: -# mode: replicated -# replicas: 0 -# restart_policy: -# condition: none -# secrets: -# - minio_rp -# - minio_ru - createbuckets: - image: minio/mc - depends_on: - - minio +# image: minio/mc + image: minio/minio:RELEASE.2025-05-24T17-08-30Z + environment: *minio-env entrypoint: > sh -c " MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" && @@ -231,10 +213,11 @@ services: secrets: - minio_rp - minio_ru + networks: + - backend minio: image: minio/minio:RELEASE.2025-05-24T17-08-30Z - user: ${DOCKER_USER:-1000} environment: *minio-env healthcheck: test: ["CMD", "mc", "ready", "local"] @@ -260,7 +243,7 @@ services: - minio_ru web: - image: nginx:1.29 + image: nginx:1.25 configs: - source: nginx_conf target: /etc/nginx/conf.d/default.conf diff --git a/nginx.conf.tmpl b/nginx.conf.tmpl index 07d5d07..a9a924e 100644 --- a/nginx.conf.tmpl +++ b/nginx.conf.tmpl @@ -43,36 +43,6 @@ server { try_files $uri @proxy_to_docs_backend; } - location /static { - try_files $uri @proxy_to_docs_backend; - } - - # Proxy auth for collaboration server - location /collaboration/ws/ { - # Ensure WebSocket upgrade - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - - # Collaboration server - proxy_pass http://y-provider:4444; - - # Set appropriate timeout for WebSocket - proxy_read_timeout 86400; - proxy_send_timeout 86400; - - # Preserve original host and additional headers - proxy_set_header X-Forwarded-Proto https; - proxy_set_header Origin $http_origin; - proxy_set_header Host $host; - } - - location /collaboration/api/ { - # Collaboration server - proxy_pass http://y-provider:4444; - proxy_set_header Host $host; - } - # Proxy auth for media location /media/ { # Auth request configuration @@ -87,18 +57,18 @@ server { proxy_set_header X-Amz-Content-SHA256 $authContentSha256; # Get resource from Minio - proxy_pass http://minio:9000/docs-media-storage/; + proxy_pass http://minio:9000/drive-media-storage/; proxy_set_header Host minio:9000; } location /media-auth { - proxy_pass http://docs_backend/api/v1.0/documents/media-auth/; + proxy_pass http://docs_backend/api/v1.0/items/media-auth/; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Original-URL $request_uri; - + # Prevent the body from being passed proxy_pass_request_body off; proxy_set_header Content-Length "";