-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (114 loc) · 2.5 KB
/
docker-compose.yml
File metadata and controls
115 lines (114 loc) · 2.5 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
name: restaurant-μservices-showcase
# https://docs.docker.com/compose/compose-file
services:
zipkin:
image: openzipkin/zipkin:latest
container_name: zipkin
restart: on-failure
ports:
- "9411:9411"
networks:
- app-network
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
healthcheck:
test: [ "CMD", "wget", "-qO-", "http://localhost:9411/health" ]
interval: 10s
timeout: 5s
retries: 5
redis-cache:
image: redis:8.4-alpine
container_name: redis-cache
restart: on-failure
ports:
- "6379:6379"
networks:
- app-network
command: >
redis-server
--appendonly yes
--maxmemory 128mb
--maxmemory-policy allkeys-lru
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 3
window: 60s
resources:
limits:
cpus: '1'
memory: 128M
reservations:
cpus: '0.25'
memory: 64M
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 10
postgres-restaurant:
image: postgres:17-alpine
restart: on-failure
env_file: docker/.env.postgres-restaurant
volumes:
- ~/dbdata/postgresql/restaurant:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- postgres-network
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 3
window: 60s
resources:
limits:
cpus: '2'
memory: 1024M
reservations:
cpus: '1'
memory: 256M
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 3s
timeout: 2s
retries: 10
# pgadmin:
# image: dpage/pgadmin4
# restart: on-failure
# environment:
# PGADMIN_DEFAULT_EMAIL: admin@pgadmin.com
# PGADMIN_DEFAULT_PASSWORD: mypgadminpass
# volumes:
# - pgadmin_data:/var/lib/pgadmin
# ports:
# - "5050:80"
# networks:
# - postgres-network
# depends_on:
# postgres-keycloak:
# condition: service_started
# postgres-tom:
# condition: service_started
# deploy:
# resources:
# limits:
# cpus: '2'
# memory: 512M
# reservations:
# cpus: '0.5'
# memory: 128M
#
#volumes:
# pgadmin_data:
networks:
app-network:
postgres-network: