Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.9

WORKDIR /postit

COPY requirements.txt .

RUN pip install -r requirements.txt

EXPOSE 8000

CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
26 changes: 26 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
db:
image: postgres
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
env_file:
- .env
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/postit
ports:
- "8000:8000"
depends_on:
- db
environment:
- SECRET_KEY=${SECRET_KEY}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
env_file:
- .env
tty: true
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
db:
image: postgres
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/postit
ports:
- "8000:8000"
depends_on:
- db
environment:
- SECRET_KEY=${SECRET_KEY}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
tty: true
1 change: 0 additions & 1 deletion post_it_backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

env = environ.Env()
environ.Env.read_env(env_file=str(BASE_DIR) + '/.env')

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
Expand Down
14 changes: 7 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
django
djangorestframework
psycopg2
django-environ
pylint
flake8
pylint-django
Django==4.2.6
django-environ==0.11.2
djangorestframework==3.14.0
flake8==6.1.0
psycopg2==2.9.9
pylint==3.0.2
pylint-django==2.5.5