-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathdocker-compose.dev.postgres.yml
More file actions
139 lines (131 loc) · 2.79 KB
/
docker-compose.dev.postgres.yml
File metadata and controls
139 lines (131 loc) · 2.79 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
networks:
appnet:
services:
database:
image: postgres:17
restart: unless-stopped
ports:
- "${DB_PORT:-5432}:5432"
env_file:
- .env
environment:
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASS:-password}
POSTGRES_DB: ${DB_NAME:-peekaping}
volumes:
- ./.data/postgres:/var/lib/postgresql/data
networks:
- appnet
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-peekaping}"]
interval: 30s
timeout: 2s
retries: 5
start_period: 5s
redis:
image: redis:7
restart: always
ports:
- "${REDIS_PORT:-6379}:6379"
networks:
- appnet
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 2s
retries: 5
start_period: 5s
migrate:
build:
context: ./apps/server
dockerfile: infra/Dockerfile.migrate
restart: "no"
env_file:
- .env
depends_on:
database:
condition: service_healthy
networks:
- appnet
api:
build:
context: ./apps/server
dockerfile: infra/Dockerfile.api
restart: unless-stopped
ports:
- "8034:8034"
env_file:
- .env
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
networks:
- appnet
healthcheck:
test: ["CMD-SHELL", "wget -qO - http://localhost:8034/api/v1/health || exit 1"]
interval: 30s
timeout: 2s
retries: 5
start_period: 5s
producer:
build:
context: ./apps/server
dockerfile: infra/Dockerfile.producer
restart: unless-stopped
env_file:
- .env
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
networks:
- appnet
worker:
build:
context: ./apps/server
dockerfile: infra/Dockerfile.worker
restart: unless-stopped
env_file:
- .env
depends_on:
redis:
condition: service_healthy
networks:
- appnet
ingester:
build:
context: ./apps/server
dockerfile: infra/Dockerfile.ingester
restart: unless-stopped
env_file:
- .env
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
networks:
- appnet
web:
build:
context: .
dockerfile: ./apps/web/Dockerfile
restart: unless-stopped
ports:
- "8383:80"
environment:
- API_URL=http://localhost:8034
depends_on:
api:
condition: service_healthy
networks:
- appnet
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"]
interval: 30s
timeout: 2s
retries: 5
start_period: 5s