-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
85 lines (79 loc) · 1.92 KB
/
docker-compose.prod.yml
File metadata and controls
85 lines (79 loc) · 1.92 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
version: '3.8'
services:
app:
container_name: app
image: ${DOCKER_USERNAME}/backend:latest
restart: always
volumes:
- ./logs:/app/logs
depends_on:
- postgres
- redis
- elasticsearch
environment:
- MODE=production
- PORT=8080
- DB_HOST=postgres
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DB_PORT=5432
- DB_SSLMODE=disable
- JWT_SECRET=${JWT_SECRET}
- REDIS_HOST=redis
- REDIS_PORT=6379
- ELASTICSEARCH_URL=http://elasticsearch:9200
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS}
ports:
- "8080:8080"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
postgres:
image: "postgres:17-alpine"
restart: always
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- postgresql_data:/var/lib/postgresql/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
redis:
image: "redis:alpine"
restart: always
command: redis-server --appendonly yes
volumes:
- redis_data:/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.0
restart: always
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- bootstrap.memory_lock=true
- xpack.security.enabled=false
volumes:
- elastic_data:/usr/share/elasticsearch/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Optional: Add other services (compilers, etc.) if needed in production
# For now, keeping it minimal for the backend API
volumes:
postgresql_data:
redis_data:
elastic_data: