Adding Docker support

This commit is contained in:
Sébastien Clément 2017-12-20 17:21:18 +01:00 committed by GitHub
parent e2902b101c
commit 34cb2ce0f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM python:3
ENV PYTHONUNBUFFERED 1
#RUN apt-get update \
# && apt-get install -y python-mysqldb
RUN mkdir /code
WORKDIR /code
ADD src/requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/

26
docker-compose.yml Normal file
View File

@ -0,0 +1,26 @@
version: '3'
services:
web:
build: .
command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- ./src:/code
ports:
- "8000:8000"
depends_on:
- database
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
ports:
- "8001:80"
depends_on:
- database
env_file:
- pma.env
database:
image: mariadb:latest
volumes:
- ./db:/var/lib/mysql
env_file:
- database.env