Docker support
This commit is contained in:
parent
7c09af2147
commit
1703b9d57e
3 changed files with 52 additions and 2 deletions
12
.dockerfile
Normal file
12
.dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
FROM python:3.5
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY requirements.txt /usr/src/app/
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV PYTHONIOENCODING utf_8
|
25
docker-compose.yml
Normal file
25
docker-compose.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
web:
|
||||
build: .
|
||||
dockerfile: .dockerfile
|
||||
command: python manage.py runserver 0.0.0.0:80
|
||||
volumes:
|
||||
- ./:/usr/src/app
|
||||
links:
|
||||
- postgres
|
||||
- elasticsearch
|
||||
ports:
|
||||
- "80:80"
|
||||
environment:
|
||||
- DEBUG=True
|
||||
- DEV=True
|
||||
- DATABASE_URL=postgres://postgres:@postgres:5432/postgres
|
||||
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
||||
- SECRET_KEY=notasecretreplaceme
|
||||
postgres:
|
||||
image: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
elasticsearch:
|
||||
image: orchardup/elasticsearch
|
||||
ports:
|
||||
- "9200:9200"
|
|
@ -1,9 +1,23 @@
|
|||
# Updated: 27.3.2017
|
||||
|
||||
# Core
|
||||
wagtail==1.9
|
||||
puput==0.8
|
||||
Django==1.10.6
|
||||
|
||||
# Database
|
||||
psycopg2==2.7.1
|
||||
dj-database-url==0.4.2
|
||||
|
||||
# Addons
|
||||
puput==0.8
|
||||
|
||||
# Search
|
||||
elasticsearch==5.2.0
|
||||
|
||||
# Caching
|
||||
django-redis==4.7.0
|
||||
|
||||
# Frontend
|
||||
django-libsass==0.7
|
||||
libsass==0.12.3
|
||||
Pillow==4.0.0
|
||||
|
@ -12,7 +26,6 @@ Pillow==4.0.0
|
|||
stellar==0.4.3
|
||||
|
||||
# Production dependencies
|
||||
dj-database-url==0.4.2
|
||||
whitenoise==3.3.0
|
||||
uwsgi==2.0.14
|
||||
ConcurrentLogHandler==0.9.1
|
||||
|
|
Loading…
Reference in a new issue