Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.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
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: lecturelog
POSTGRES_PASSWORD: ${WEB_POSTGRES_PASSWORD:?WEB_POSTGRES_PASSWORD is required}
POSTGRES_DB: lecturelog
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U lecturelog -d lecturelog"]
interval: 5s
timeout: 5s
retries: 5
minio:
image: minio/minio
# Заглушка MinIO ядра для изолированной разработки без реального ядра.
profiles: ["stub-minio"]
environment:
MINIO_ROOT_USER: ${CORE_MINIO_ACCESS_KEY:?CORE_MINIO_ACCESS_KEY is required}
MINIO_ROOT_PASSWORD: ${CORE_MINIO_SECRET_KEY:?CORE_MINIO_SECRET_KEY is required}
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
minio-init:
image: minio/mc
profiles: ["stub-minio"]
depends_on:
minio:
condition: service_healthy
environment:
CORE_MINIO_ACCESS_KEY: ${CORE_MINIO_ACCESS_KEY:?CORE_MINIO_ACCESS_KEY is required}
CORE_MINIO_SECRET_KEY: ${CORE_MINIO_SECRET_KEY:?CORE_MINIO_SECRET_KEY is required}
CORE_MINIO_BUCKET: ${CORE_MINIO_BUCKET:?CORE_MINIO_BUCKET is required}
entrypoint: >-
/bin/sh -c '
mc alias set local http://minio:9000 "$$CORE_MINIO_ACCESS_KEY" "$$CORE_MINIO_SECRET_KEY" &&
mc mb --ignore-existing "local/$$CORE_MINIO_BUCKET" &&
mc anonymous set download "local/$$CORE_MINIO_BUCKET"
'
volumes:
postgres-data:
minio-data: