mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
nginx!
This commit is contained in:
parent
21a935fea5
commit
7b9023dd07
3 changed files with 34 additions and 1 deletions
|
@ -34,7 +34,7 @@ services:
|
||||||
- DJANGO_ADMIN_USERNAME=admin
|
- DJANGO_ADMIN_USERNAME=admin
|
||||||
- DJANGO_ADMIN_PASSWORD=admin
|
- DJANGO_ADMIN_PASSWORD=admin
|
||||||
- DJANGO_ADMIN_EMAIL=admin@example.com
|
- DJANGO_ADMIN_EMAIL=admin@example.com
|
||||||
- PUBLIC_URL='http://127.0.0.1:8000'
|
- PUBLIC_URL='http://127.0.0.1:81'
|
||||||
- DEBUG=True
|
- DEBUG=True
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
@ -43,6 +43,27 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- adventurelog_media:/code/media/
|
- adventurelog_media:/code/media/
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
image: nginx:latest
|
||||||
|
ports:
|
||||||
|
- "81:80" # Using port 81 to avoid conflict with your existing setup
|
||||||
|
volumes:
|
||||||
|
- adventurelog_media:/app/media
|
||||||
|
- ./proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
|
depends_on:
|
||||||
|
- server
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
adventurelog_media:
|
adventurelog_media:
|
||||||
|
#
|
||||||
|
# nginx:
|
||||||
|
# build:
|
||||||
|
# context: ./proxy/
|
||||||
|
# dockerfile: Dockerfile.nginx
|
||||||
|
# ports:
|
||||||
|
# - "81:80" # Using port 81 to avoid conflict with your existing setup
|
||||||
|
# volumes:
|
||||||
|
# - adventurelog_media:/app/media
|
||||||
|
# depends_on:
|
||||||
|
# - server
|
||||||
|
|
4
proxy/Dockerfile.nginx
Normal file
4
proxy/Dockerfile.nginx
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
RUN rm /etc/nginx/conf.d/default.conf
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d
|
8
proxy/nginx.conf
Normal file
8
proxy/nginx.conf
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
location /media/ {
|
||||||
|
alias /app/media/;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue