- use rustfs instead of minio and provide migration script - Schedule clean_pending_items/purge_deleted_items with celery beat - Give celery workers the S3 access key secret - Collabora admin access needs setting a password Following the [C4DT AI Policy](https://git.coopcloud.tech/c4dt/ai-policy/src/branch/main/AI-POLICY.md): #LLM_vibe #LLM_model Claude Opus 5.5 - [x] I take full responsibility for this code - [x] I understand every line of this code - [x] I tested this code thoroughly on my own computer / servers - [x] None of the commit messages were created using LLMs - [x] I will participate in any discussion on my own and will not use an LLM for the discussion Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
97 lines
3.0 KiB
Cheetah
97 lines
3.0 KiB
Cheetah
upstream docs_backend {
|
|
server {{ env "STACK_NAME" }}_backend:8000 fail_timeout=0;
|
|
}
|
|
|
|
upstream docs_frontend {
|
|
server {{ env "STACK_NAME" }}_app:8080 fail_timeout=0;
|
|
}
|
|
|
|
server {
|
|
listen 8083;
|
|
server_name localhost;
|
|
|
|
# Disables server version feedback on pages and in headers
|
|
server_tokens off;
|
|
|
|
location @proxy_to_docs_backend {
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_redirect off;
|
|
proxy_pass http://docs_backend;
|
|
}
|
|
|
|
location @proxy_to_docs_frontend {
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_redirect off;
|
|
proxy_pass http://docs_frontend;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri @proxy_to_docs_frontend;
|
|
}
|
|
|
|
location /api {
|
|
try_files $uri @proxy_to_docs_backend;
|
|
}
|
|
|
|
location /admin {
|
|
try_files $uri @proxy_to_docs_backend;
|
|
}
|
|
|
|
# Proxy auth for media
|
|
location /media/ {
|
|
# Auth request configuration
|
|
auth_request /media-auth;
|
|
auth_request_set $authHeader $upstream_http_authorization;
|
|
auth_request_set $authDate $upstream_http_x_amz_date;
|
|
auth_request_set $authContentSha256 $upstream_http_x_amz_content_sha256;
|
|
|
|
# Pass specific headers from the auth response
|
|
proxy_set_header Authorization $authHeader;
|
|
proxy_set_header X-Amz-Date $authDate;
|
|
proxy_set_header X-Amz-Content-SHA256 $authContentSha256;
|
|
|
|
# Get resource from the RustFS object storage
|
|
proxy_pass http://rustfs:9000/drive-media-storage/;
|
|
proxy_set_header Host rustfs:9000;
|
|
}
|
|
|
|
# Proxy auth for media-preview
|
|
location /media/preview/ {
|
|
# Auth request configuration
|
|
auth_request /media-auth;
|
|
auth_request_set $authHeader $upstream_http_authorization;
|
|
auth_request_set $authDate $upstream_http_x_amz_date;
|
|
auth_request_set $authContentSha256 $upstream_http_x_amz_content_sha256;
|
|
|
|
# Pass specific headers from the auth response
|
|
proxy_set_header Authorization $authHeader;
|
|
proxy_set_header X-Amz-Date $authDate;
|
|
proxy_set_header X-Amz-Content-SHA256 $authContentSha256;
|
|
|
|
# Get resource from the RustFS object storage
|
|
proxy_pass http://rustfs:9000/drive-media-storage/;
|
|
proxy_set_header Host rustfs:9000;
|
|
}
|
|
|
|
location /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 "";
|
|
proxy_set_header X-Original-Method $request_method;
|
|
}
|
|
}
|
|
|