diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..8daf8d6e --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/Dockerfile.pythonnc b/Dockerfile.pythonnc new file mode 100644 index 00000000..a137214a --- /dev/null +++ b/Dockerfile.pythonnc @@ -0,0 +1,2 @@ +FROM python:3.6 +RUN apt-get update && apt-get install -y netcat diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..393e8fef --- /dev/null +++ b/docker-compose.yml @@ -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: \ No newline at end of file diff --git a/Pipfile b/server/Pipfile similarity index 100% rename from Pipfile rename to server/Pipfile diff --git a/Pipfile.lock b/server/Pipfile.lock similarity index 100% rename from Pipfile.lock rename to server/Pipfile.lock