-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
150 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Minio | ||
|
||
```shell | ||
$ mc alias set local http://localhost:9000 program qwerty123 | ||
$ mc mb local/my-bucket | ||
$ mc mv data.txt local/my-bucket/ | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
version: "3.9" | ||
|
||
x-minio-common: &minio-common | ||
image: | ||
minio/minio:latest | ||
command: server --console-address ":9001" http://minio-{1...2}/data | ||
expose: | ||
- "9000" | ||
- "9001" | ||
environment: | ||
MINIO_ROOT_USER: program | ||
MINIO_ROOT_PASSWORD: qwerty123 | ||
healthcheck: | ||
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ] | ||
interval: 30s | ||
timeout: 20s | ||
retries: 3 | ||
|
||
services: | ||
minio-1: | ||
<<: *minio-common | ||
hostname: minio-1 | ||
volumes: | ||
- data1:/data | ||
|
||
minio-2: | ||
<<: *minio-common | ||
hostname: minio-2 | ||
volumes: | ||
- data2:/data | ||
|
||
nginx: | ||
image: nginx:1.25-alpine | ||
hostname: nginx | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf:ro | ||
ports: | ||
- "9000:9000" | ||
- "9001:9001" | ||
healthcheck: | ||
test: "curl --fail http://localhost:9001 || exit 1" | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
depends_on: | ||
minio-1: | ||
condition: service_healthy | ||
minio-2: | ||
condition: service_healthy | ||
|
||
volumes: | ||
data1: | ||
data2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
user nginx; | ||
worker_processes auto; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 4096; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
upstream minio { | ||
server minio-1:9000; | ||
server minio-2:9000; | ||
} | ||
|
||
upstream console { | ||
ip_hash; | ||
server minio-1:9001; | ||
server minio-2:9001; | ||
} | ||
|
||
server { | ||
listen 9000; | ||
server_name localhost; | ||
|
||
ignore_invalid_headers off; | ||
client_max_body_size 0; | ||
proxy_buffering off; | ||
proxy_request_buffering off; | ||
|
||
location / { | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
|
||
proxy_connect_timeout 300; | ||
proxy_http_version 1.1; | ||
proxy_set_header Connection ""; | ||
chunked_transfer_encoding off; | ||
|
||
proxy_pass http://minio; | ||
} | ||
} | ||
|
||
server { | ||
listen 9001; | ||
server_name localhost; | ||
|
||
ignore_invalid_headers off; | ||
client_max_body_size 0; | ||
proxy_buffering off; | ||
proxy_request_buffering off; | ||
|
||
location / { | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-NginX-Proxy true; | ||
|
||
real_ip_header X-Real-IP; | ||
|
||
proxy_connect_timeout 300; | ||
|
||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
|
||
chunked_transfer_encoding off; | ||
|
||
proxy_pass http://console; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters