-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-full-stack.yml
More file actions
87 lines (86 loc) · 1.93 KB
/
docker-compose-full-stack.yml
File metadata and controls
87 lines (86 loc) · 1.93 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
# https://docs.docker.com/compose/compose-file
services:
restaurant-service:
build:
context: .
dockerfile: dockerfile-service
image: codelearn/restaurant-service:0.0.1
env_file:
- docker/.env.postgres-restaurant
- docker/.env-restaurant
expose:
- "80"
networks:
- app-network
- postgres-network
deploy:
resources:
limits:
cpus: '2'
memory: 2048M
reservations:
cpus: '1'
memory: 512M
depends_on:
postgres-tom:
condition: service_healthy
keycloak:
condition: service_healthy
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: