-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
executable file
·65 lines (59 loc) · 1.2 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
version: '3.9'
services:
app:
container_name: carts
build:
context: .
volumes:
- ./src:/app/code
ports:
- "8000:8000"
env_file:
- .env.defaults
- .env
depends_on:
- db
- redis
command: sh -c "alembic upgrade head && uvicorn app.api.rest.main:app --host 0.0.0.0 --port 8000 --log-level info --reload"
worker:
build:
context: .
env_file:
- .env.defaults
- .env
depends_on:
- db
- redis
command: arq app.infra.events.arq.workers.ConsumerSettings --watch .
periodic:
build:
context: .
env_file:
- .env.defaults
- .env
depends_on:
- db
- redis
command: arq app.infra.events.arq.workers.PeriodicSettings --watch .
db:
image: postgres:14-alpine
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "6432:5432"
environment:
- TZ=Europe/Moscow
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=template
redis:
image: redis:7.2.1-alpine
volumes:
- redis-data:/data
ports:
- "7379:6379"
command:
- redis-server
volumes:
postgres-data:
redis-data: