Skip to content

Commit

Permalink
Ref #178 - Add dockerfile and docker-compose along with env file for …
Browse files Browse the repository at this point in the history
…database
  • Loading branch information
Kerem Zaman committed Nov 14, 2021
1 parent a928d82 commit 8a91abc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.6

ADD requirements.txt .
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

ADD . /
WORKDIR /

CMD gunicorn --bind 0.0.0.0:9000 -w 1 app.wsgi

EXPOSE 9000
3 changes: 3 additions & 0 deletions database.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POSTGRES_USER=rebound_user
POSTGRES_PASSWORD=-#My6o0dPa33W0rd#-
POSTGRES_DB=rebound_db
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "3"
services:
backend:
build: backend
ports:
- "9000:9000"
environment:
WAIT_HOSTS: database:5432
DEBUG: 'False'
database:
image: "postgres:latest"
env_file:
- database.env
ports:
- "5432:5432"
volumes:
- database-data:/var/lib/postgresql/data/

volumes:
database-data:

0 comments on commit 8a91abc

Please sign in to comment.