-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (63 loc) · 1.28 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
services:
app:
build:
context: .
target: development
env_file:
- .env.docker
command: >
bash -c "alembic upgrade head
&& python -m vkusvill_green_labels.main"
volumes:
- .:/app
profiles:
- dev
app-prod:
build:
context: .
target: production
env_file:
- .env.docker
command: >
bash -c "alembic upgrade head
&& python -m vkusvill_green_labels.main"
volumes:
- ./vkusvill_settings.json:/app/vkusvill_settings.json
profiles:
- prod
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: vkusvill
PGDATA: /data/postgres
ports:
- "5432:5432"
volumes:
- postgres-data:/data/postgres
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U user -d vkusvill" ]
interval: 5s
timeout: 5s
retries: 5
profiles:
- infra
- dev
- prod
redis:
image: redis:7-alpine
ports:
- "6379:6379"
command: redis-server --save 60 1 --loglevel warning
volumes:
- redis-data:/data
restart: unless-stopped
profiles:
- dev
- infra
- prod
volumes:
postgres-data:
redis-data: