-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
60 lines (57 loc) · 1.3 KB
/
docker-compose.dev.yaml
File metadata and controls
60 lines (57 loc) · 1.3 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
services:
app:
image: ecommerce-api-image:latest
networks:
- app_network
- shared_ecommerce_network
build:
context: .
container_name: ecommerce-app
restart: always
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
environment:
- SPRING_PROFILES_ACTIVE=dev
env_file:
- .env
db:
image: postgres
container_name: ecommerce-db
networks:
- app_network
- shared_ecommerce_network
restart: always
shm_size: 128mb
ports:
- "5432:5432"
volumes:
- type: tmpfs
target: /dev/shm
tmpfs:
size: 134217728
env_file:
- .env
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
postgres-exporter:
image: quay.io/prometheuscommunity/postgres-exporter
container_name: postgres-exporter
restart: unless-stopped
environment:
- DATA_SOURCE_NAME=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable
ports:
- "9187:9187"
networks:
- app_network
- shared_ecommerce_network
networks:
app_network:
driver: bridge
shared_ecommerce_network:
external: true