-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (66 loc) · 1.53 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
version: "3.3"
services:
web:
container_name: web
build:
context: ./
dockerfile: ./docker/web/Dockerfile
volumes:
- "./web/src:/web/src"
- "./web/public:/web/public"
ports:
- "3000:3000"
stdin_open: true
backend:
container_name: backend
build:
context: ./
dockerfile: ./docker/backend/Dockerfile
command: "python3 /usr/src/app.py"
volumes:
- "./backend:/usr/src"
restart: on-failure
environment:
CELERY_BROKER_URL: redis://redis:6379/0
JWT_SECRET: nimble-secret
POSTGRES_USER: nimble
POSTGRES_PASSWORD: nimble-test
POSTGRES_DB: nimble
POSTGRES_HOST: db
SCRAPING_DELAY: 1
ports:
- "5000:5000"
depends_on:
- db
db:
container_name: db
image: postgres:11
environment:
POSTGRES_USER: nimble
POSTGRES_PASSWORD: nimble-test
POSTGRES_DB: nimble
ports:
- "5432:5432"
redis:
container_name: redis
image: "redis:5.0.4-stretch"
restart: "no"
stop_grace_period: "3s"
worker:
container_name: worker
build:
context: ./
dockerfile: ./docker/backend/Dockerfile
command: "celery worker -A worker.client --loglevel=info --concurrency=10"
volumes:
- "./backend:/usr/src"
environment:
CELERY_BROKER_URL: redis://redis:6379/0
JWT_SECRET: nimble-secret
POSTGRES_USER: nimble
POSTGRES_PASSWORD: nimble-test
POSTGRES_DB: nimble
POSTGRES_HOST: db
SCRAPING_DELAY: 1
depends_on:
- db