-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (82 loc) · 2.37 KB
/
docker-compose.yml
File metadata and controls
86 lines (82 loc) · 2.37 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
services:
web:
build: .
container_name: molt-log-web
restart: unless-stopped
env_file:
- .env
environment:
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:5777}
- PORT=5777
- S3_ENDPOINT=${S3_ENDPOINT:-http://minio:9000}
- S3_PUBLIC_URL=${S3_PUBLIC_URL:-http://localhost:9000}
- S3_BUCKET=${S3_BUCKET:-molt-uploads}
- S3_REGION=${S3_REGION:-us-east-1}
- S3_ACCESS_KEY=${S3_ACCESS_KEY:-minioadmin}
- S3_SECRET_KEY=${S3_SECRET_KEY:-minioadmin}
- S3_FORCE_PATH_STYLE=${S3_FORCE_PATH_STYLE:-true}
ports:
- "127.0.0.1:5777:5777"
depends_on:
mongo:
condition: service_healthy
minio:
condition: service_started
extra_hosts:
- "host.docker.internal:host-gateway"
mongo:
image: mongo:8
container_name: molt-log-mongo
restart: unless-stopped
command: ["mongod", "--port", "13777", "--bind_ip_all"]
environment:
- MONGO_INITDB_DATABASE=molt-log
ports:
- "127.0.0.1:13777:13777"
volumes:
- ./mongo:/data/db
healthcheck:
test: ["CMD", "mongosh", "--port", "13777", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
minio:
image: minio/minio:latest
container_name: molt-log-minio
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=${S3_ACCESS_KEY:-minioadmin}
- MINIO_ROOT_PASSWORD=${S3_SECRET_KEY:-minioadmin}
ports:
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
volumes:
- ./minio:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
minio-setup:
image: minio/mc:latest
container_name: molt-log-minio-setup
depends_on:
minio:
condition: service_healthy
entrypoint: ["/bin/sh","-c"]
environment:
- S3_BUCKET=${S3_BUCKET:-molt-uploads}
- S3_ACCESS_KEY=${S3_ACCESS_KEY:-minioadmin}
- S3_SECRET_KEY=${S3_SECRET_KEY:-minioadmin}
command: |
"set -e
mc alias set local http://minio:9000 $S3_ACCESS_KEY $S3_SECRET_KEY
mc mb -p local/$S3_BUCKET || true
mc anonymous set download local/$S3_BUCKET
echo Bucket '$S3_BUCKET' ready"
restart: "no"
volumes:
mongo-data:
minio-data: