change docker-compose so that port 8000 is only exposed between containers. Also fix nginx volume so that it uses the correct nginx.conf file

This commit is contained in:
Jonathan Math 2021-02-21 11:59:21 -05:00
parent f55121f4f3
commit 014d22f47e

View file

@ -26,8 +26,8 @@ services:
nofile: nofile:
soft: 10000 soft: 10000
hard: 10000 hard: 10000
ports: expose:
- '8000:8000' - '8000'
# only use gunicorn if the TEST env variable is not "True" # only use gunicorn if the TEST env variable is not "True"
command: bash -c 'if [[ -z "${TEST}" && "${TEST}" = "True" ]] ; then echo "starting test env"; else gunicorn --bind :8000 newsblur_web.wsgi:application; fi' command: bash -c 'if [[ -z "${TEST}" && "${TEST}" = "True" ]] ; then echo "starting test env"; else gunicorn --bind :8000 newsblur_web.wsgi:application; fi'
volumes: volumes:
@ -50,7 +50,7 @@ services:
environment: environment:
- DOCKERBUILD=True - DOCKERBUILD=True
volumes: volumes:
- ./docker/nginx:/etc/nginx/conf.d - ./docker/nginx/nginx.local.conf:/etc/nginx/conf.d/nginx.conf
- app-files:/srv/newsblur - app-files:/srv/newsblur
postgres: postgres: