-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
36 lines (33 loc) · 817 Bytes
/
Copy pathcompose.yaml
File metadata and controls
36 lines (33 loc) · 817 Bytes
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
name: twigtree
services:
db:
image: postgres:16
environment:
POSTGRES_DB: twigtree-db
POSTGRES_USER: twigtree123
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U twigtree123 -d twigtree-db"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
mem_limit: 256m
app:
build: .
depends_on:
db:
condition: service_healthy
environment:
DB_URL: jdbc:postgresql://db:5432/twigtree-db
DB_USERNAME: twigtree123
DB_PASSWORD: ${DB_PASSWORD}
JAVA_TOOL_OPTIONS: "-XX:MaxRAMPercentage=70.0 -XX:InitialRAMPercentage=40.0"
ports:
- "8080:8080"
restart: unless-stopped
mem_limit: 600m
volumes:
pgdata: