-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
68 lines (64 loc) · 1.7 KB
/
docker-compose.prod.yml
File metadata and controls
68 lines (64 loc) · 1.7 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
# Production Docker Compose Configuration
# This file extends the base docker-compose.yml with production-specific settings
services:
postgres:
restart: always
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
mongodb:
restart: always
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '1'
memory: 512M
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER:-root}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:-change-me}
backend:
restart: always
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${DB_NAME:-code_sharing_platform}
SPRING_DATASOURCE_USERNAME: ${DB_USER:-postgres}
SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD:-change-me}
SPRING_DATA_MONGODB_URI: mongodb://${MONGO_USER:-root}:${MONGO_PASSWORD:-change-me}@mongodb:27017/${DB_NAME:-code_sharing_platform}?authSource=admin
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-change-me-in-production}
LOGGING_LEVEL_ROOT: WARN
LOGGING_LEVEL_COM_CODESHARING_PLATFORM: INFO
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '1'
memory: 512M
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
frontend:
restart: always
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"