version: '3.7'
services:
web:
container_name: web
build: .
command: gunicorn geoApp.wsgi:application --bind 0.0.0.0:8000
volumes:
- /var/code/static
expose:
- 8000
env_file:
- ./prod.env
nginx:
container_name: nginx
image: nginx:1.17.8-alpine
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./static:/var/code/static
ports:
- 8989:8989
depends_on:
- web
def server_error(request):
import sys, traceback
error_type, error, tb = sys.exc_info()
context = {
'error_message': error
}
response = render_to_response('calcdist/index.html', context)
response.status_code = 500
return response