Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (69 loc) · 1.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (69 loc) · 1.78 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
version: '3.8'
services:
db:
image: postgres:17
environment:
POSTGRES_DB: expensetracker
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
# Minimal PostgreSQL tuning for local dev
POSTGRES_SHARED_BUFFERS: 128MB
POSTGRES_WORK_MEM: 4MB
POSTGRES_MAX_CONNECTIONS: 100
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 256M
cpus: '0.25'
app:
build: .
depends_on:
db:
condition: service_healthy
restart: unless-stopped
ports:
- "8081:8081"
environment:
# Database configuration
DB_JDBC_URL: "jdbc:postgresql://db:5432/expensetracker"
DB_USER: "postgres"
DB_PASSWORD: "password"
# JWT configuration
JWT_SECRET: "your-super-secret-jwt-key-change-in-production"
JWT_ISSUER: "expensetracker"
JWT_AUDIENCE: "expensetracker-users"
JWT_REALM: "expensetracker-app"
JWT_EXPIRATION_HOURS: "24"
# Authentication
REGISTRATION_CODE: "WEYRICK2025"
# Application settings
LOG_LEVEL: "INFO"
# Database connection pool (optional - using defaults)
# DB_MAX_POOL_SIZE: "10"
# DB_MIN_IDLE: "2"
# DB_CONNECTION_TIMEOUT: "30000"
# DB_IDLE_TIMEOUT: "300000"
# DB_MAX_LIFETIME: "900000"
# DB_LEAK_DETECTION_THRESHOLD: "60000"
deploy:
resources:
limits:
memory: 1G
cpus: '1.0'
reservations:
memory: 512M
cpus: '0.25'
volumes:
pgdata: