version: '3.1' services: elasticsearch: image: elasticsearch:7.17.4 # volumes: # - /etc/localtime:/etc/localtime # - ./es/plugins:/usr/share/elasticsearch/plugins #插件文件挂载 # - ./es/data:/usr/share/elasticsearch/data #数据文件挂载 ports: - '9200:9200' - '9300:9300' container_name: elasticsearch restart: always environment: - 'cluster.name=elasticsearch' #设置集群名称为elasticsearch - 'discovery.type=single-node' #以单一节点模式启动 - 'ES_JAVA_OPTS=-Xms1024m -Xmx1024m' #设置使用jvm内存大小 - 'TZ=Asia/Shanghai' minio: image: minio/minio ports: - '9000:9000' # api 端口 - '9090:9090' # 控制台端口 restart: always environment: - 'MINIO_ROOT_USER=minioadmin' - 'MINIO_ROOT_PASSWORD=12345678' - 'TZ=Asia/Shanghai' # volumes: # - /docker/minio/data:/data #映射当前目录下的data目录至容器内/data目录 # - /docker/minio/config:/root/.minio/ #映射配置目录 command: server --console-address ':9090' /data #指定容器中的目录 /data privileged: true volumes: elasticsearch: minio:
标签:compose,minio,9090,elasticsearch,volumes,docker,data From: https://www.cnblogs.com/goPush/p/17132373.html