-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
68 lines (63 loc) · 1.45 KB
/
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:
swagger:
# image: swaggerapi/swagger-ui
build:
context: .
dockerfile: Dockerfile.swagger
environment:
SWAGGER_JSON: /mnt/api.swagger.json
ports:
- "8081:8080"
volumes:
- ./gen/openapiv2/:/mnt
depends_on:
- postgres
- proto
web:
build:
context: .
dockerfile: Dockerfile.web
ports:
- "3000:3000"
volumes: # temp approach
- ./certs/:/certs
depends_on:
- postgres
- proto
proto:
build:
context: .
dockerfile: Dockerfile.server
environment:
DB_HOST: postgres
DB_PASSWORD: ${DB_PASSWORD}
DB_USER: ${DB_USER}
DB_NAME: ${DB_NAME}
ports:
- "8080:8080"
- "9090:9090"
volumes: # temp approach
- ./certs/:/certs
depends_on:
- postgres
postgres:
image: postgres:17-alpine
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USER}
POSTGRES_DB: ${DB_NAME}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME} -h 127.0.0.1"]
interval: 2s
timeout: 10s
retries: 5
migrate:
image: migrate/migrate
depends_on:
postgres:
condition: service_healthy
volumes:
- ./migrations/:/migrations
command: ["-path", "/migrations/", "-database", "postgres://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}?sslmode=disable", "up"]