-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (40 loc) · 1.12 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: "3"
services:
app:
build:
context: .
ports:
- "8000:8000"
volumes:
- ./app:/app
command: >
sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
environment:
- DB_HOST=db
- DB_NAME=app
- DB_USER=postgres
- DB_PASS=supersecretpassword
depends_on:
- db
# you may have to list all you db here when deploying
db:
image: postgres:10-alpine
environment:
- POSTGRES_DB=app
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersecretpassword
# in production you will change this password when you deploy
# web:
# build:
# context: .
# ports:
# - "${PORT}:${PORT}"
# command: >
# sh -c "python manage.py wait_for_db && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
# environment:
# - DB_HOST=ec2-54-83-50-174.compute-1.amazonaws.com
# - DB_NAME=d7amock6vml2kn
# - DB_USER=mlfhencfolursx
# - DB_PASS=e14d6da0db8c5310cd2f71f168b0cbc6e561700b5eb9f575b6131645dcda33b6