Add docker configuration

This commit is contained in:
Ramon Wenger 2018-08-27 14:10:33 +02:00
parent 3f797db3f4
commit c28e1b2b05
5 changed files with 37 additions and 0 deletions

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM iterativ/python3_netcat
ENV PYTHONUNBUFFERED 1
RUN mkdir /env
RUN mkdir /app
RUN pip install pipenv
ADD ./server/ /app/
#RUN apt-get update && apt-get -y install netcat && apt-get clean
#RUN apt-get -y install netcat
WORKDIR /app
RUN pipenv install --system --deploy

2
Dockerfile.pythonnc Normal file
View File

@ -0,0 +1,2 @@
FROM python:3.6
RUN apt-get update && apt-get install -y netcat

23
docker-compose.yml Normal file
View File

@ -0,0 +1,23 @@
version: '3'
services:
db:
image: 'postgres'
environment:
- POSTGRES_PASSWORD=skillbox
- POSTGRES_USER=skillbox
- POSTGRES_DB=skillbox
volumes:
- helloclassdb:/var/lib/postgresql/data
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- "./server:/app"
ports:
- "8000:8000"
depends_on:
- db
volumes:
helloclassdb:

View File