-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathcompose.yaml
46 lines (46 loc) · 1022 Bytes
/
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
---
services:
postgres:
image: postgres:17-alpine
environment:
- POSTGRES_USER=ipam
- POSTGRES_PASSWORD=ipam
- POSTGRES_DB=ipam
restart: always
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready" , "--dbname=ipam", "--username=ipam"]
interval: 10s
timeout: 5s
retries: 5
expose:
- 5432
ipam:
image: go-ipam
build:
context: .
environment:
- GOIPAM_GRPC_SERVER_ENDPOINT=0.0.0.0:9090
- GOIPAM_PG_HOST=postgres
- GOIPAM_PG_PORT=5432
- GOIPAM_PG_USER=ipam
- GOIPAM_PG_PASSWORD=ipam
- GOIPAM_PG_DBNAME=ipam
- GOIPAM_LOG_LEVEL=debug
restart: always
command:
postgres
ports:
- 9090:9090
- 2112:2112
healthcheck:
test: ["CMD", "/bin/grpc_health_probe", "-addr","localhost:9090"]
interval: 10s
timeout: 2s
retries: 3
start_period: 10s
depends_on:
- postgres
volumes:
db_data: