-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref #178 - Add dockerfile and docker-compose along with env file for …
…database
- Loading branch information
Kerem Zaman
committed
Nov 14, 2021
1 parent
a928d82
commit 8a91abc
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |