Adding Docker support
This commit is contained in:
parent
e2902b101c
commit
34cb2ce0f7
10
Dockerfile
Normal file
10
Dockerfile
Normal 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
26
docker-compose.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user