version:'3.7'# Settings and configurations that are common for all containersx-minio-common:&minio-commonimage:quay.io/minio/minio:RELEASE.2022-12-12T19-27-27Zcommand:server --console-address ":9001" http://minio{1...4}/data{1...2}expose: - "9000" - "9001"environment:MINIO_ROOT_USER:minioadminMINIO_ROOT_PASSWORD:minioadminhealthcheck:test: ["CMD","curl","-f","http://localhost:9000/minio/health/live"]interval:30stimeout:20sretries:3# starts 4 docker containers running minio server instances.# using nginx reverse proxy, load balancing, you can access# it through port 9000.services:minio1:<<:*minio-commonhostname:minio1volumes: - data1-1:/data1 - data1-2:/data2minio2:<<:*minio-commonhostname:minio2volumes: - data2-1:/data1 - data2-2:/data2minio3:<<:*minio-commonhostname:minio3volumes: - data3-1:/data1 - data3-2:/data2minio4:<<:*minio-commonhostname:minio4volumes: - data4-1:/data1 - data4-2:/data2nginx:image:nginx:1.19.2-alpinehostname:nginxvolumes: - ./nginx.conf:/etc/nginx/nginx.conf:roports: - "80:80" - "8080:8080"depends_on: - minio1 - minio2 - minio3 - minio4## By default this config uses default local driver,## For custom volumes replace with volume driver configuration.volumes:data1-1:data1-2:data2-1:data2-2:data3-1:data3-2:data4-1:data4-2:
nginx.conf
usernginx;worker_processesauto;error_log/var/log/nginx/error.lognotice;pid/var/run/nginx.pid;events{worker_connections1024;}http{include/etc/nginx/mime.types;default_typeapplication/octet-stream;log_formatmain'$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;server_tokensoff;sendfileon;#tcp_nopush on;keepalive_timeout65;#client_max_body_size 100m; #client_header_timeout 5m;#client_body_timeout 5m;#proxy_connect_timeout 5m;#proxy_read_timeout 5m;#proxy_send_timeout 5m;#gzip on;upstreamminio{#least_conn;serverminio:80; }upstreamadminminio{serverminio:81; }server{listen80;server_name_;return404; }server{listen80;server_nameback.oss.906401.comoss.906401.com;ignore_invalid_headersoff;client_max_body_size0;proxy_bufferingoff;proxy_request_bufferingoff;location/{proxy_set_headerHost $http_host;proxy_set_headerX-Real-IP $remote_addr;proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_headerX-Forwarded-Proto $scheme;proxy_connect_timeout300;proxy_http_version1.1;proxy_set_headerConnection"";chunked_transfer_encodingoff;proxy_passhttp://minio; } }server{listen54321;server_nameoss.906401.com;ignore_invalid_headersoff;client_max_body_size0;proxy_bufferingoff;proxy_request_bufferingoff;location/{proxy_set_headerHost $http_host;proxy_set_headerX-Real-IP $remote_addr;proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_headerX-Forwarded-Proto $scheme;proxy_set_headerX-NginX-Proxytrue;# This is necessary to pass the correct IP to be hashedreal_ip_headerX-Real-IP;proxy_connect_timeout300;# To support websocketproxy_http_version1.1;proxy_set_headerUpgrade $http_upgrade;proxy_set_headerConnection"upgrade";chunked_transfer_encodingoff;proxy_passhttp://adminminio; } }}
docker-compose 错误
Error saving credentials: error storing credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY
Ubuntu / Debian
sudo apt-get install pass gnupg2
# create a gpg2 key
gpg2 --gen-key
# create the password store using the gpg user id
pass init $gpg_id
Fedora / RHEL
sudoyuminstallpassgnupg2# create a gpg2 keygpg2--gen-key# create the password store using the gpg user idpassinit $gpg_id