wip: librephotos
This commit is contained in:
parent
884232fbea
commit
6606a3878b
62
apps/librephotos/data/proxy/nginx.conf
Normal file
62
apps/librephotos/data/proxy/nginx.conf
Normal file
|
@ -0,0 +1,62 @@
|
|||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log debug;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
# React routes are entirely on the App side in the web broswer
|
||||
# Always proxy to root with the same page request when nginx 404s
|
||||
error_page 404 /;
|
||||
proxy_intercept_errors on;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://librephotos-frontend:3000/;
|
||||
}
|
||||
location ~ ^/(api|media)/ {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host __backend_name__;
|
||||
include uwsgi_params;
|
||||
proxy_pass http://librephotos-backend:8001;
|
||||
}
|
||||
# needed for webpack-dev-server
|
||||
location /ws {
|
||||
proxy_pass http://librephotos-frontend:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
# Django media
|
||||
location /protected_media {
|
||||
internal;
|
||||
alias /protected_media/;
|
||||
}
|
||||
|
||||
location /static/drf-yasg {
|
||||
proxy_pass http://librephotos-backend:8001;
|
||||
}
|
||||
|
||||
location /data {
|
||||
internal;
|
||||
alias /data/;
|
||||
}
|
||||
|
||||
# Original Photos
|
||||
location /original {
|
||||
internal;
|
||||
alias /data/;
|
||||
}
|
||||
# Nextcloud Original Photos
|
||||
location /nextcloud_original {
|
||||
internal;
|
||||
alias /data/nextcloud_media/;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ services:
|
|||
volumes:
|
||||
- ${APP_DATA_DIR}/data/scan:/data
|
||||
- ${ROOT_FOLDER_HOST}/media/data/images:/protected_media
|
||||
- ${APP_DATA_DIR}/data/proxy/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
ports:
|
||||
- ${APP_PORT}:80
|
||||
depends_on:
|
||||
|
@ -55,7 +56,7 @@ services:
|
|||
- ${APP_DATA_DIR}/data/cache:/root/.cache
|
||||
environment:
|
||||
- SECRET_KEY=${LIBREPHOTOS_SECRET_KEY}
|
||||
- BACKEND_HOST=backend
|
||||
- BACKEND_HOST=librephotos-backend
|
||||
- ADMIN_EMAIL=${LIBREPHOTOS_EMAIL}
|
||||
- ADMIN_USERNAME=${LIBREPHOTOS_USERNAME}
|
||||
- ADMIN_PASSWORD=${LIBREPHOTOS_PASSWORD}
|
||||
|
|
Loading…
Reference in New Issue
Block a user