-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-single.yml
More file actions
131 lines (119 loc) · 3.96 KB
/
docker-compose-single.yml
File metadata and controls
131 lines (119 loc) · 3.96 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# =============================================================================
# MinIO - Single Server Mode (Direct Port Access)
# =============================================================================
# Usage: docker compose -f docker-compose-single.yml up -d
#
# Features:
# - Single MinIO server with direct port binding
# - Admin console with full management UI
# - Init container for declarative bucket/user setup
# - IPv6 support
#
# Access:
# - S3 API: http://localhost:${EXPOSED_API_PORT}
# - Console: http://localhost:${EXPOSED_CONSOLE_PORT}
# =============================================================================
### Service Templates ###
x-minio-common: &minio-common
image: ${MINIO_IMAGE:-ghcr.io/bauer-group/cs-minio/minio}:${MINIO_VERSION:-latest}
restart: unless-stopped
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
command: server --address ":9000" --console-address ":9001" /data
environment:
- TZ=${TIME_ZONE:-Etc/UTC}
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minioadmin}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioadmin}
- MINIO_REGION_NAME=${MINIO_REGION:-eu-central-1}
# Disable built-in browser (admin console provides full management UI)
- MINIO_BROWSER=off
# ── Prometheus Monitoring (optional) ────────────────────────────
# Metrics endpoints: /minio/v2/metrics/cluster, /minio/v2/metrics/node
# Uncomment to allow unauthenticated scraping (default: jwt):
# - MINIO_PROMETHEUS_AUTH_TYPE=public
expose:
- 9000/tcp
- 9001/tcp
networks:
local:
services:
### Application Services ###
# MinIO S3 Server
minio-server:
<<: *minio-common
container_name: ${STACK_NAME:-s3-app}_SERVER
hostname: minio-server
volumes:
- minio-data:/data
ports:
- "${EXPOSED_API_PORT:-9000}:9000"
### Admin Console ###
admin-console:
image: ${CONSOLE_IMAGE:-ghcr.io/bauer-group/cs-minio/minio-console}:${CONSOLE_VERSION:-latest}
container_name: ${STACK_NAME:-s3-app}_CONSOLE
hostname: admin-console
restart: unless-stopped
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
environment:
- TZ=${TIME_ZONE:-Etc/UTC}
- CONSOLE_MINIO_SERVER=http://minio-server:9000
- CONSOLE_MINIO_REGION=${MINIO_REGION:-eu-central-1}
expose:
- 9090/tcp
ports:
- "${EXPOSED_CONSOLE_PORT:-9001}:9090"
depends_on:
minio-server:
condition: service_healthy
networks:
local:
### Initialization ###
# MinIO Init Container (runs on every start, idempotent)
minio-init:
image: ${MINIO_INIT_IMAGE:-ghcr.io/bauer-group/cs-minio/minio-init}:${MINIO_INIT_VERSION:-latest}
container_name: ${STACK_NAME:-s3-app}_INIT
restart: "no"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "1"
environment:
- TZ=${TIME_ZONE:-Etc/UTC}
- MINIO_ENDPOINT=http://minio-server:9000
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minioadmin}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioadmin}
- MINIO_WAIT_TIMEOUT=${MINIO_WAIT_TIMEOUT:-60}
# Pass through environment variables used in config JSON files
- CONSOLE_USER=${CONSOLE_USER:-console-admin}
- CONSOLE_PASSWORD=${CONSOLE_PASSWORD:-console-admin}
volumes:
# Optional: mount custom initialization config (see config/minio-init.example.json)
# - ${MINIO_INIT_CONFIG:-./config/minio-init.json}:/app/config/init.json:ro
- minio-credentials:/data/credentials
depends_on:
minio-server:
condition: service_healthy
networks:
local:
### Volumes ###
volumes:
minio-data:
driver: local
name: ${STACK_NAME:-s3-app}-data
minio-credentials:
driver: local
name: ${STACK_NAME:-s3-app}-credentials
### Networks ###
networks:
local:
driver: bridge
name: ${STACK_NAME:-s3-app}
enable_ipv6: true