-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
117 lines (109 loc) · 2.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
117 lines (109 loc) · 2.77 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: "3.8"
services:
# MySQL Database
mysql:
image: mysql:8.0
container_name: lettuce-mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: lettuce
MYSQL_USER: lettuce
MYSQL_PASSWORD: lettuce
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
- ./src/main/resources/db/migration:/docker-entrypoint-initdb.d
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot"]
interval: 10s
timeout: 5s
retries: 5
networks:
- main-network
# Redis for caching
redis:
image: redis:7.0-alpine
container_name: lettuce-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- main-network
# command: redis-server --save 60 1 --loglevel warning
# healthcheck:
# test: ["CMD", "redis-cli", "ping"]
# interval: 10s
# timeout: 5s
# MinIO for S3-compatible object storage
minio:
image: minio/minio
container_name: lettuce-minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio-data:/data
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# Adminer for database management
adminer:
image: adminer
container_name: lettuce-adminer
ports:
- "8081:8080"
environment:
ADMINER_DEFAULT_SERVER: mysql
depends_on:
- mysql
# Prometheus for monitoring
prometheus:
image: prom/prometheus
container_name: lettuce-prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
# Grafana for visualization
grafana:
image: grafana/grafana
container_name: lettuce-grafana
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
depends_on:
- prometheus
networks:
main-network:
driver: bridge
volumes:
mysql-data:
redis-data:
minio-data:
prometheus-data:
grafana-data: