-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
116 lines (108 loc) · 2.64 KB
/
docker-compose.yml
File metadata and controls
116 lines (108 loc) · 2.64 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
services:
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
postgres-init:
image: postgres:17-alpine
depends_on:
postgres:
condition: service_healthy
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGHOST: postgres
PGPORT: 5432
PGPASSWORD: postgres
command: >
sh -c "
echo 'Creating db database...';
psql -U postgres -h postgres -c 'CREATE DATABASE db;' || echo 'Database db already exists';
echo 'Database initialization complete';
"
restart: "no"
pgadmin:
image: dpage/pgadmin4:latest
restart: unless-stopped
ports:
- "8080:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: password
depends_on:
postgres:
condition: service_healthy
volumes:
- pgadmin_data:/var/lib/pgadmin
redis:
image: redis:8-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
redis-browser:
image: redis/redisinsight:latest
restart: unless-stopped
volumes:
- redisinsight_data:/data
ports:
- "8001:5540"
environment:
REDISINSIGHT_PASSWORD: redisinsight
depends_on:
redis:
condition: service_healthy
minio:
image: minio/minio:latest
restart: unless-stopped
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
# MinIO client initialization (runs once and exits)
minio-init:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set minio http://minio:9000 minioadmin minioadmin;
mc mb minio/default-bucket --ignore-existing;
echo 'MinIO initialization complete';
"
restart: "no"
volumes:
postgres_data:
pgadmin_data:
redis_data:
redisinsight_data:
minio_data: