mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2026-07-30 23:38:02 -04:00
- Introduced .dockerignore to exclude unnecessary files from Docker context. - Added .env.aio.example for minimal configuration of the AdventureLog All-in-One setup. - Updated .env.example to include optional SITE_URL and GUNICORN_WORKERS settings. - Enhanced deploy.sh script for improved deployment flexibility and backup options. - Updated docker-compose files to use PostGIS 16-3.5 and added health checks for services. - Created docker-compose.aio.yml for All-in-One deployment configuration. - Improved health checks and service dependencies in docker-compose.dev.yml and docker-compose.yml. - Added GitHub workflows for building and pushing Docker images, including smoke tests for AIO setup.
63 lines
1.7 KiB
Plaintext
63 lines
1.7 KiB
Plaintext
worker_processes 1;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
client_max_body_size 100M;
|
|
|
|
proxy_buffer_size 32k;
|
|
proxy_buffers 8 32k;
|
|
proxy_busy_buffers_size 64k;
|
|
|
|
upstream frontend {
|
|
server 127.0.0.1:3000;
|
|
}
|
|
|
|
upstream django {
|
|
server 127.0.0.1:8000;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
location /static/ {
|
|
alias /code/staticfiles/;
|
|
}
|
|
|
|
location /protectedMedia/ {
|
|
internal;
|
|
alias /code/media/;
|
|
try_files $uri =404;
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'none'; object-src 'none'; base-uri 'none'" always;
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header X-Frame-Options SAMEORIGIN always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
}
|
|
|
|
location ~ ^/(media|admin|accounts)(/|$) {
|
|
proxy_pass http://django;
|
|
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-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://frontend;
|
|
proxy_http_version 1.1;
|
|
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-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
}
|