Skip to content

Commit 2238a12

Browse files
author
=
committed
nginx conf tweaks
1 parent c797058 commit 2238a12

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
DEBUG='False' # True for development
22
NGINX_IMAGE='lscr.io/linuxserver/swag' # leave unset for development
33
NGINX_CONF='./nginx.prod.conf' # leave unset for development
4+
NGINX_CONF_LOCATION='/config/nginx/site-confs/default.conf' # leave unset for development
45
SECRET_KEY='secret'
56
DATABASE_PASSWORD='secret'
67
DATABASE_ROOT_PASSWORD="secret"

docker-compose.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
services:
22
web:
33
build: .
4+
container_name: django
45
volumes:
56
- .:/home/app/web
67
- static_volume:/home/app/web/staticfiles
78
- media_volume:/home/app/web/mediafiles
9+
- /etc/localtime:/etc/localtime:ro
810
expose:
911
- 8000
1012
env_file: .env
@@ -39,7 +41,10 @@ services:
3941
nginx:
4042
image: ${NGINX_IMAGE-nginx}:latest # default setting is for development, use lscr.io/linuxserver/swag for production
4143
volumes:
42-
- ${NGINX_CONF-./nginx.dev.conf}:/etc/nginx/nginx.conf:ro
44+
# the root conf file is set for dev, but for production use:
45+
# NGINX_CONF='./nginx.prod.conf'
46+
# NGINX_CONF_LOCATION='/config/nginx/site-confs/default.conf'
47+
- ${NGINX_CONF-./nginx.dev.conf}:${NGINX_CONF_LOCATION-/etc/nginx/nginx.conf}
4348
- ./swag:/config
4449
- ./nginx_fishauctions.conf:/etc/nginx/nginx_fishauctions.conf:ro
4550
- static_volume:/home/app/web/staticfiles:ro

nginx.prod.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ server {
1717

1818
include /config/nginx/ssl.conf;
1919

20-
include ./nginx_fishauctions.conf
20+
include ./nginx_fishauctions.conf;
2121
}

0 commit comments

Comments
 (0)