Add first version of docker files

This commit is contained in:
PCoder 2022-08-25 10:26:17 +05:30
parent b7f8e237fa
commit c5bfc46e33
2 changed files with 33 additions and 0 deletions

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM python:3
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY . /code/

26
docker-compose.yml Normal file
View File

@ -0,0 +1,26 @@
version: "3.9"
services:
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
environment:
- POSTGRES_NAME=app
- POSTGRES_USER=app
- POSTGRES_PASSWORD=
depends_on:
- db