-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yaml
81 lines (74 loc) · 1.92 KB
/
compose.yaml
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
name: metro-now
services:
web:
image: metro-now_web
container_name: web
pull_policy: build
restart: always
ports:
- 3000:3000
build:
context: .
dockerfile: ./Dockerfile
target: metro-now_web
healthcheck:
test: ["CMD", "curl", "-f", "http://host.docker.internal:3000/"]
interval: 30s
timeout: 5s
retries: 5
redis-stack:
image: redis/redis-stack:latest
container_name: redis-stack
restart: always
ports:
- 6379:6379
- 8001:8001
extra_hosts:
- "host.docker.internal:host-gateway"
postgres:
container_name: postgres
image: postgres:16-alpine
restart: always
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data/
env_file:
- ".env.docker"
extra_hosts:
- "host.docker.internal:host-gateway"
backend:
image: metro-now_backend
container_name: backend
pull_policy: build
command:
- /bin/bash
- -c
- |
pnpm prisma:migrate:deploy
pnpm start:prod
depends_on:
- postgres
- redis-stack
build:
context: .
dockerfile: ./Dockerfile
target: metro-now_backend
restart: always
ports:
- 3001:3001
volumes:
- backend-data:/app
env_file:
- ".env.docker"
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "curl", "-f", "http://host.docker.internal:3001/"]
interval: 30s
start_period: 300s
timeout: 10s
retries: 5
volumes:
backend-data:
postgres-data: