Deployment support
This commit is contained in:
parent
97a8119efb
commit
e898834b06
3 changed files with 18 additions and 31 deletions
|
@ -1,13 +0,0 @@
|
|||
FROM node:6
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN echo '{ "allow_root": true }' > /root/.bowerrc
|
||||
|
||||
COPY package.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN npm install -g bower
|
||||
COPY bower.json /usr/src/app/
|
||||
RUN bower install
|
||||
|
|
@ -1,28 +1,28 @@
|
|||
web:
|
||||
build: .
|
||||
dockerfile: .dockerfile
|
||||
command: python manage.py runserver 0.0.0.0:5000
|
||||
command: gunicorn publichealth.wsgi:application -b 0.0.0.0:5000 -w 5 --log-file=-
|
||||
volumes:
|
||||
- ./:/usr/src/app
|
||||
- /var/log/publichealth:/var/log/publichealth
|
||||
links:
|
||||
- redis
|
||||
- postgres
|
||||
- elasticsearch
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
|
||||
- SECRET_KEY=${SECRET_KEY}
|
||||
- DEBUG=${DEBUG}
|
||||
- DEV=${DEBUG}
|
||||
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
|
||||
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
|
||||
- DATABASE_URL=postgres://postgres:@postgres:5432/postgres
|
||||
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
||||
frontend:
|
||||
build: .
|
||||
dockerfile: .dockerfile-frontend
|
||||
volumes:
|
||||
- ./:/usr/src/app
|
||||
working_dir: /usr/src/app
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- LOG_DIR=/var/log/publichealth
|
||||
redis:
|
||||
image: redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
postgres:
|
||||
image: postgres
|
||||
ports:
|
||||
|
|
|
@ -7,8 +7,8 @@ from .base import *
|
|||
# Instead, use environment variables or create a local.py file on the server.
|
||||
|
||||
# Disable debug mode
|
||||
DEBUG = True
|
||||
TEMPLATES[0]['OPTIONS']['debug'] = True
|
||||
DEBUG = False
|
||||
TEMPLATES[0]['OPTIONS']['debug'] = False
|
||||
|
||||
# Compress static files offline and minify CSS
|
||||
# http://django-compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_OFFLINE
|
||||
|
|
Loading…
Reference in a new issue