working on minio
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# 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=v5
|
export ABRA_ENTRYPOINT_VERSION=v5
|
||||||
export NGINX_CONF_VERSION=v3
|
export NGINX_CONF_VERSION=v4
|
||||||
export PG_BACKUP_VERSION=v3
|
export PG_BACKUP_VERSION=v3
|
||||||
|
|
||||||
environment() {
|
environment() {
|
||||||
|
|||||||
+22
-39
@@ -7,7 +7,7 @@ x-common-env: &common-env
|
|||||||
DJANGO_CONFIGURATION: Production
|
DJANGO_CONFIGURATION: Production
|
||||||
DJANGO_ALLOWED_HOSTS: "*"
|
DJANGO_ALLOWED_HOSTS: "*"
|
||||||
# DJANGO_SECRET_KEY supplied via secrets
|
# DJANGO_SECRET_KEY supplied via secrets
|
||||||
DJANGO_SETTINGS_MODULE: impress.settings
|
DJANGO_SETTINGS_MODULE: drive.settings
|
||||||
# DJANGO_SUPERUSER_PASSWORD supplied via secrets
|
# DJANGO_SUPERUSER_PASSWORD supplied via secrets
|
||||||
# Logging
|
# Logging
|
||||||
# Set to DEBUG level for dev only
|
# Set to DEBUG level for dev only
|
||||||
@@ -28,14 +28,14 @@ x-common-env: &common-env
|
|||||||
DJANGO_EMAIL_USE_TLS:
|
DJANGO_EMAIL_USE_TLS:
|
||||||
DJANGO_EMAIL_FROM:
|
DJANGO_EMAIL_FROM:
|
||||||
# Backend url
|
# Backend url
|
||||||
IMPRESS_BASE_URL: "https://${DOMAIN}"
|
DRIVE_BASE_URL: "https://${DOMAIN}"
|
||||||
# Media
|
# Media
|
||||||
STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage
|
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_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)
|
# AWS_S3_SECRET_ACCESS_KEY supplied via secret (this is same as MINIO_ROOT_PASSWORD)
|
||||||
MEDIA_BASE_URL: https://${DOMAIN}
|
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 - settings from .env, see .env.sample
|
||||||
OIDC_OP_JWKS_ENDPOINT:
|
OIDC_OP_JWKS_ENDPOINT:
|
||||||
OIDC_OP_AUTHORIZATION_ENDPOINT:
|
OIDC_OP_AUTHORIZATION_ENDPOINT:
|
||||||
@@ -78,7 +78,7 @@ services:
|
|||||||
|
|
||||||
app:
|
app:
|
||||||
user: "${DOCKER_USER:-1000}"
|
user: "${DOCKER_USER:-1000}"
|
||||||
image: drive:frontend-development
|
image: lasuite/drive-frontend:v0.10.1
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./src/frontend/:/home/frontend/
|
# - ./src/frontend/:/home/frontend/
|
||||||
# - /home/frontend/node_modules
|
# - /home/frontend/node_modules
|
||||||
@@ -96,10 +96,14 @@ services:
|
|||||||
timeout: 30s
|
timeout: 30s
|
||||||
retries: 20
|
retries: 20
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
user: ${DOCKER_USER:-1000}
|
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:
|
environment:
|
||||||
<<: [ *common-env, *postgres-env ]
|
<<: [ *common-env, *postgres-env ]
|
||||||
# volumes:
|
# volumes:
|
||||||
@@ -108,6 +112,8 @@ services:
|
|||||||
# - /app/.venv
|
# - /app/.venv
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
configs:
|
configs:
|
||||||
- source: abra_entrypoint
|
- source: abra_entrypoint
|
||||||
target: /abra-entrypoint.sh
|
target: /abra-entrypoint.sh
|
||||||
@@ -125,11 +131,11 @@ services:
|
|||||||
|
|
||||||
celery:
|
celery:
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
image: drive:backend-development
|
image: lasuite/drive-backend:v0.10.1
|
||||||
networks:
|
networks:
|
||||||
- default
|
- backend
|
||||||
- lasuite
|
|
||||||
command: [ "celery", "-A", "drive.celery_app", "worker", "-l", "INFO" ]
|
command: [ "celery", "-A", "drive.celery_app", "worker", "-l", "INFO" ]
|
||||||
|
entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"]
|
||||||
environment:
|
environment:
|
||||||
<<: [*common-env, *postgres-env]
|
<<: [*common-env, *postgres-env]
|
||||||
# volumes:
|
# volumes:
|
||||||
@@ -183,38 +189,14 @@ services:
|
|||||||
- backend
|
- backend
|
||||||
|
|
||||||
mailcatcher:
|
mailcatcher:
|
||||||
image: sj26/mailcatcher:latest
|
image: sj26/mailcatcher:v0.10.0
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- 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:
|
createbuckets:
|
||||||
image: minio/mc
|
# image: minio/mc
|
||||||
depends_on:
|
image: minio/minio:RELEASE.2025-05-24T17-08-30Z
|
||||||
- minio
|
environment: *minio-env
|
||||||
entrypoint: >
|
entrypoint: >
|
||||||
sh -c "
|
sh -c "
|
||||||
MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" &&
|
MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" &&
|
||||||
@@ -231,10 +213,11 @@ services:
|
|||||||
secrets:
|
secrets:
|
||||||
- minio_rp
|
- minio_rp
|
||||||
- minio_ru
|
- minio_ru
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio:RELEASE.2025-05-24T17-08-30Z
|
image: minio/minio:RELEASE.2025-05-24T17-08-30Z
|
||||||
user: ${DOCKER_USER:-1000}
|
|
||||||
environment: *minio-env
|
environment: *minio-env
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mc", "ready", "local"]
|
test: ["CMD", "mc", "ready", "local"]
|
||||||
@@ -260,7 +243,7 @@ services:
|
|||||||
- minio_ru
|
- minio_ru
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
+2
-32
@@ -43,36 +43,6 @@ server {
|
|||||||
try_files $uri @proxy_to_docs_backend;
|
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
|
# Proxy auth for media
|
||||||
location /media/ {
|
location /media/ {
|
||||||
# Auth request configuration
|
# Auth request configuration
|
||||||
@@ -87,12 +57,12 @@ server {
|
|||||||
proxy_set_header X-Amz-Content-SHA256 $authContentSha256;
|
proxy_set_header X-Amz-Content-SHA256 $authContentSha256;
|
||||||
|
|
||||||
# Get resource from Minio
|
# 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;
|
proxy_set_header Host minio:9000;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /media-auth {
|
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 X-Forwarded-Proto https;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|||||||
Reference in New Issue
Block a user