-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
112 lines (105 loc) · 3.21 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: "3"
services:
web:
container_name: demoapp-backend
command: bash -c "uvicorn main:app --host 0.0.0.0 --port 8000 --reload"
depends_on:
- db
- test-db
- redis
environment:
- DATABASE_URL=postgresql://postgres:postgres@db/db
- TEST_DATABASE_URL=postgresql://postgres:postgres@test-db/test-db
- BASE_URL=http://localhost:8000
- APP_ENV=development
- JWT_REFRESH_SECRET_KEY=JWT_REFRESH_SECRET_KEY_HERE
- JWT_SECRET_KEY=WT_SECRET_KEY_HERE
- ROLLBAR_ACCESS_TOKEN=ROLLBAR_ACCESS_TOKEN_HERE
- BUCKET_NAME=BUCKET_NAME
- OAUTH_CLIENT_ID=CLIENT_IDw
- OAUTH_CLIENT_SECRET=OAUTH_CLIENT_SECRET
- MAIL_PASSWORD=NupfGHXtsUdgx36VuK
- MAIL_PORT=587
- MAIL_SERVER=smtp.ethereal.email
- MAIL_FROM_NAME=Norval Hahn
- INVITATION_URL_SECRET_KEY=INVITATION_URL_SECRET_KEY_HERE
- INVITATION_URL_SECURITY_PASSWORD_SALT=INVITATION_URL_SECURITY_PASSWORD_SALT_HERE
- INVITATION_URL_MAX_AGE=172800
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
develop:
watch:
- action: rebuild
path: .
db:
image: postgres:11
ports:
- "5433:5432"
volumes:
- db:/postgresql
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=db
test-db:
image: postgres:11
ports:
- "5434:5432"
volumes:
- test-db:/postgresql
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=test-db
worker:
build: .
command: celery -A app.worker.celery worker --loglevel=info
environment:
- DATABASE_URL=postgresql://postgres:postgres@db/db
- TEST_DATABASE_URL=postgresql://postgres:postgres@test-db/test-db
- BASE_URL=http://localhost:8000
- APP_ENV=development
- JWT_REFRESH_SECRET_KEY=JWT_REFRESH_SECRET_KEY_HERE
- JWT_SECRET_KEY=WT_SECRET_KEY_HERE
- ROLLBAR_ACCESS_TOKEN=ROLLBAR_ACCESS_TOKEN_HERE
- BUCKET_NAME=BUCKET_NAME
- OAUTH_CLIENT_ID=CLIENT_IDw
- OAUTH_CLIENT_SECRET=OAUTH_CLIENT_SECRET
- MAIL_PASSWORD=NupfGHXtsUdgx36VuK
- MAIL_PORT=587
- MAIL_SERVER=smtp.ethereal.email
- MAIL_FROM_NAME=Norval Hahn
- INVITATION_URL_SECRET_KEY=INVITATION_URL_SECRET_KEY_HERE
- INVITATION_URL_SECURITY_PASSWORD_SALT=INVITATION_URL_SECURITY_PASSWORD_SALT_HERE
- INVITATION_URL_MAX_AGE=172800
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
depends_on:
- web
- redis
redis:
image: redis:7
dashboard:
build: .
command: celery --broker=redis://redis:6379/0 flower --port=5555
ports:
- 5556:5555
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
depends_on:
- web
- redis
- worker
volumes:
db:
test-db: