-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
58 lines (54 loc) · 1.2 KB
/
docker-compose.dev.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
# Docker Compose file for setting up a Spring Boot application with PostgreSQL
# - Defines two services: app (Spring Boot) and db (PostgreSQL)
# - Configures resource limits and reservations for the app
# - Uses a shared volume for persistent PostgreSQL data
services:
app:
build: .
container_name: springboot-app
ports:
- "8080:8080"
env_file: "docker-dev.env"
deploy:
resources:
limits:
cpus: '1.5'
memory: '6g'
reservations:
cpus: '1'
memory: '4g'
depends_on:
- db
- cache-redis
db:
image: postgres:latest
container_name: postgres-db
env_file:
- docker-dev.env
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
deploy:
resources:
limits:
cpus: '0.3'
memory: '1g'
reservations:
cpus: '0.2'
memory: '512m'
cache-redis:
image: redis:7.4
container_name: cache-redis
ports:
- "6379:6379"
deploy:
resources:
limits:
cpus: '0.2'
memory: '512m'
reservations:
cpus: '0.1'
memory: '256m'
volumes:
postgres-data: