-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
187 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
version: '3.9' | ||
services: | ||
nginx: | ||
container_name: nginx | ||
image: nginx:latest | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf | ||
- socket_logs:/tmp/marvin | ||
- web_assets:/usr/share/nginx/html | ||
ports: | ||
- 8080:80 | ||
depends_on: | ||
- marvin | ||
networks: | ||
- frontend | ||
|
||
redis: | ||
container_name: redis | ||
image: redis:latest | ||
networks: | ||
- backend | ||
|
||
# db: | ||
# image: postgres:latest | ||
# volumes: | ||
# - ./dbdata/:/var/lib/postgresql/data | ||
# environment: | ||
# POSTGRES_DB: manga | ||
# POSTGRES_USER: ${MANGADB_USER} | ||
# POSTGRES_PASSWORD: ${MANGADB_PASS} | ||
# networks: | ||
# - backend | ||
|
||
marvin: | ||
container_name: marvin | ||
image: marvin:latest | ||
ports: | ||
- 8000:8000 | ||
volumes: | ||
- ${SAS_BASE_DIR}:/root/sas/ | ||
- $HOME/.pgpass:/root/.pgpass | ||
- socket_logs:/tmp/marvin | ||
- web_assets:/app/python/marvin/web | ||
environment: | ||
- SESSION_REDIS=redis://redis:6379 | ||
- MARVIN_BASE=marvin | ||
- PUBLIC_SERVER=True | ||
- MANGADB_CONFIG=docker | ||
networks: | ||
- backend | ||
- frontend | ||
depends_on: | ||
- redis | ||
#- db | ||
|
||
|
||
networks: | ||
backend: | ||
frontend: | ||
|
||
volumes: | ||
socket_logs: | ||
web_assets: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
events { | ||
use epoll; | ||
worker_connections 51200; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
# gzip on; | ||
# gzip_disable "msie6"; | ||
|
||
#error_log /etc/nginx/nginx-error.log warn; | ||
#access_log /etc/nginx/nginx-access.log; | ||
|
||
client_max_body_size 20m; | ||
|
||
#proxy_cache_path /etc/nginx/cache keys_zone=one:500m max_size=1000m; | ||
|
||
# upstream marvin { | ||
# server unix:/tmp/marvin/marvin.sock; | ||
# server 127.0.0.1:8000; | ||
# } | ||
|
||
# types { | ||
# text/html html htm; | ||
# text/css css; | ||
# application/javascript js; | ||
# image/jpeg jpg; | ||
# image/png png; | ||
# } | ||
|
||
server { | ||
listen 80 default_server; | ||
server_name localhost; | ||
|
||
# location /marvin { | ||
# proxy_set_header Host $http_host; | ||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
# proxy_set_header X-Forwarded-Proto $scheme; | ||
# #proxy_redirect off; | ||
# #proxy_buffering off; | ||
# proxy_pass http://marvin:8000; | ||
# #proxy_cache one; | ||
# #proxy_http_version 1.1; | ||
|
||
# #add_header 'Access-Control-Allow-Origin' '*'; # Adjust this as needed | ||
# #add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; # Adjust this as needed | ||
# #add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; # Adjust this as needed | ||
|
||
# # error_log /etc/nginx/marvin_error.log error; | ||
# # access_log /etc/nginx/marvin_access.log; | ||
# } | ||
|
||
location / { | ||
proxy_pass http://marvin:8000/; | ||
#rewrite ^/marvin(/.*)$ $1 break; | ||
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; | ||
proxy_redirect off; | ||
proxy_buffering off; | ||
} | ||
|
||
location /api/ { | ||
proxy_pass http://marvin:8000/; | ||
#rewrite ^/marvin(/.*)$ $1 break; | ||
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; | ||
proxy_redirect off; | ||
proxy_buffering off; | ||
} | ||
# location /marvin/api { | ||
# proxy_set_header Host $http_host; | ||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
# proxy_set_header X-Forwarded-Proto $scheme; | ||
# #proxy_redirect off; | ||
# #proxy_buffering off; | ||
# proxy_pass http://marvin:8000; | ||
# #proxy_cache one; | ||
# #proxy_http_version 1.1; | ||
|
||
# #add_header 'Access-Control-Allow-Origin' '*'; # Adjust this as needed | ||
# #add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; # Adjust this as needed | ||
# #add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; # Adjust this as needed | ||
|
||
# # error_log /etc/nginx/marvin_api_error.log error; | ||
# # access_log /etc/nginx/marvin_api_access.log; | ||
# } | ||
|
||
location /marvin/static/ { | ||
alias /usr/share/nginx/html/static/; | ||
autoindex off; | ||
} | ||
|
||
location /marvin/lib/ { | ||
alias /usr/share/nginx/html/lib/; | ||
autoindex off; | ||
} | ||
} | ||
} | ||
|