-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (48 loc) · 1.27 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
services:
api:
build: .
container_name: api
ports:
- "8000:8000"
depends_on:
- redis
- db
environment:
- DATABASE_URL=postgresql://user:password@db/dbname
- REDIS_URL=redis://redis:6379
worker:
build: .
container_name: worker
command: rq worker high medium low default --with-scheduler
depends_on:
- redis
- db
environment:
- DATABASE_URL=postgresql://user:password@db/dbname
- REDIS_URL=redis://redis:6379
restart: always
scheduler:
build: .
container_name: scheduler
command: python -m src.scheduler
depends_on:
- redis
- db
- api
environment:
- DATABASE_URL=postgresql://user:password@db/dbname
- REDIS_URL=redis://redis:6379
redis:
image: "redis:alpine"
container_name: redis
db:
image: "postgres:16"
container_name: db
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=dbname
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: