From e6371f804df92688fed43df39673c0d9a08bcccd Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Fri, 12 Jan 2024 22:30:43 +0800 Subject: [PATCH] Update docker-compose.yml --- docker-compose.yml | 115 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 101 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8599392b7..78632f163 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,15 +10,13 @@ networks: - subnet: '${DOCKER_BRIDGE_SUBNET:-172.28.0.0/16}' gateway: '${DOCKER_BRIDGE_GATEWAY:-172.28.0.1}' - - services: mongodb: image: mongo:${MONGODB_IMAGE_VERSION-6.0.2} ports: - "${MONGO_PORT:-37017}:27017" container_name: mongo - command: --wiredTigerCacheSizeGB 1 --auth + command: ["/bin/bash", "-c", "/docker-entrypoint-initdb.d/mongo-init.sh || true; docker-entrypoint.sh mongod --wiredTigerCacheSizeGB 1 --auth"] volumes: - "${DATA_DIR:-./}/components/mongodb/data/db:/data/db" - "${DATA_DIR:-./}/components/mongodb/data/logs:/data/logs" @@ -96,7 +94,7 @@ services: ipv4_address: ${KAFKA_NETWORK_ADDRESS:-172.28.0.4} minio: - image: minio/minio:${MINIO_IMAGE_VERSION:-latest} + image: minio/minio:${MINIO_IMAGE_VERSION:-RELEASE.2024-01-11T07-46-16Z} ports: - "${MINIO_PORT:-10005}:9000" - "9090:9090" @@ -114,22 +112,111 @@ services: ipv4_address: ${MINIO_NETWORK_ADDRESS:-172.28.0.6} openim-web: - image: ${IMAGE_REGISTRY:-ghcr.io/openimsdk}/openim-web:${OPENIM_WEB_IMAGE_VERSION:-latest} + image: ${IMAGE_REGISTRY:-ghcr.io/openimsdk}/openim-web:${OPENIM_WEB_IMAGE_VERSION:-v3.5.0-docker} container_name: openim-web environment: - OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH:-/app/dist} - - OPENIM_WEB_PORT=${OPENIM_WEB_PORT:-80} + - OPENIM_WEB_PORT=${OPENIM_WEB_PORT:-11001} restart: always ports: - - "${OPENIM_WEB_PORT:-11001}:11001" + - "${OPENIM_WEB_PORT:-11001}:80" networks: server: ipv4_address: ${OPENIM_WEB_NETWORK_ADDRESS:-172.28.0.7} +### TODO: Uncomment, or deploy using openim docker: https://github.com/openimsdk/openim-docker # Uncomment and configure the following services as needed + + # openim-server: + # image: ${IMAGE_REGISTRY:-ghcr.io/openimsdk}/openim-server:${SERVER_IMAGE_VERSION:-main} + # container_name: openim-server + # ports: + # - "${OPENIM_WS_PORT:-10001}:${OPENIM_WS_PORT:-10001}" + # - "${API_OPENIM_PORT:-10002}:${API_OPENIM_PORT:-10002}" + # - "${API_PROM_PORT:-20100}:${API_PROM_PORT:-20100}" + # - "${USER_PROM_PORT:-20110}:${USER_PROM_PORT:-20110}" + # - "${FRIEND_PROM_PORT:-20120}:${FRIEND_PROM_PORT:-20120}" + # - "${MESSAGE_PROM_PORT:-20130}:${MESSAGE_PROM_PORT:-20130}" + # - "${MSG_GATEWAY_PROM_PORT:-20140}:${MSG_GATEWAY_PROM_PORT:-20140}" + # - "${GROUP_PROM_PORT:-20150}:${GROUP_PROM_PORT:-20150}" + # - "${AUTH_PROM_PORT:-20160}:${AUTH_PROM_PORT:-20160}" + # - "${PUSH_PROM_PORT:-20170}:${PUSH_PROM_PORT:-20170}" + # - "${CONVERSATION_PROM_PORT:-20230}:${CONVERSATION_PROM_PORT:-20230}" + # - "${RTC_PROM_PORT:-21300}:${RTC_PROM_PORT:-21300}" + # - "${THIRD_PROM_PORT:-21301}:${THIRD_PROM_PORT:-21301}" + # - "21400-21403:21400-21403" + # healthcheck: + # test: ["CMD", "/openim/openim-server/scripts/check-all.sh"] + # interval: 120s + # timeout: 30s + # retries: 5 + # env_file: + # - .env + # environment: + # - OPENIM_IP=${OPENIM_IP:-127.0.0.1} + # volumes: + # - "${DATA_DIR:-./}/openim-server/logs:/openim/openim-server/logs" + # - "${DATA_DIR:-./}/openim-server/_output/logs:/openim/openim-server/_output/logs" + # - "${DATA_DIR:-./}/openim-server/config:/openim/openim-server/config" + # restart: always + # depends_on: + # - kafka + # - mysql + # - mongodb + # - redis + # - minio + # logging: + # driver: json-file + # options: + # max-size: "1g" + # max-file: "2" + # networks: + # server: + # ipv4_address: ${OPENIM_SERVER_NETWORK_ADDRESS:-172.28.0.8} + + # openim-chat: + # image: ${IMAGE_REGISTRY:-ghcr.io/openimsdk}/openim-chat:${CHAT_IMAGE_VERSION:-main} + # container_name: openim-chat + # healthcheck: + # test: ["CMD", "/openim/openim-chat/scripts/check_all.sh"] + # interval: 60s + # timeout: 30s + # retries: 5 + # env_file: + # - .env + # environment: + # - ZOOKEEPER_ADDRESS=${DOCKER_BRIDGE_GATEWAY:-172.28.0.1} + # - ZOOKEEPER_PORT=${ZOOKEEPER_PORT:-12181} + # - OPENIM_SERVER_ADDRESS=http://${OPENIM_SERVER_ADDRESS:-172.28.0.1} + # - API_OPENIM_PORT=${API_OPENIM_PORT:-10002} + # - MYSQL_ADDRESS=${DOCKER_BRIDGE_GATEWAY:-172.28.0.1} + # - MYSQL_PORT=${MYSQL_PORT:-13306} + # - REDIS_ADDRESS=${DOCKER_BRIDGE_GATEWAY:-172.28.0.1} + # - REDIS_PORT=${REDIS_PORT:-16379} + # ports: + # - "${OPENIM_CHAT_API_PORT:-10008}:10008" + # - "${OPENIM_ADMIN_API_PORT:-10009}:10009" + # volumes: + # - "${DATA_DIR:-./}/components/openim-chat/logs:/openim/openim-chat/logs" + # - "${DATA_DIR:-./}/components/openim-chat/config:/openim/openim-chat/config" + # restart: always + # # user: root:root + # depends_on: + # openim-server: + # condition: service_healthy + # logging: + # driver: json-file + # options: + # max-size: "1g" + # max-file: "2" + # networks: + # server: + # ipv4_address: ${OPENIM_CHAT_NETWORK_ADDRESS:-172.28.0.9} + # openim-admin: - # image: ${IMAGE_REGISTRY:-ghcr.io/openimsdk}/openim-admin-front:v3.4.0 - # container_name: openim-admin + # # https://github.com/openimsdk/open-im-server/issues/1662 + # image: ${IMAGE_REGISTRY:-ghcr.io/openimsdk}/openim-admin:${ADMIN_FRONT_VERSION:-toc-base-open-docker.35} + # container_name: openim-admin # restart: always # ports: # - "${OPENIM_ADMIN_FRONT_PORT:-11002}:80" @@ -143,8 +230,8 @@ services: # hostname: prometheus # restart: always # volumes: - # - ./config/prometheus.yml:/etc/prometheus/prometheus.yml - # - ./config/instance-down-rules.yml:/etc/prometheus/instance-down-rules.yml + # - "${DATA_DIR:-./}/config/instance-down-rules.yml:/etc/prometheus/instance-down-rules.yml" + # - "${DATA_DIR:-./}/config/prometheus.yml:/etc/prometheus/prometheus.yml" # ports: # - "${PROMETHEUS_PORT:-19090}:9090" # networks: @@ -157,8 +244,8 @@ services: # hostname: alertmanager # restart: always # volumes: - # - ./config/alertmanager.yml:/etc/alertmanager/alertmanager.yml - # - ./config/email.tmpl:/etc/alertmanager/email.tmpl + # - ${DATA_DIR:-./}/config/alertmanager.yml:/etc/alertmanager/alertmanager.yml + # - ${DATA_DIR:-./}/config/email.tmpl:/etc/alertmanager/email.tmpl # ports: # - "${ALERT_MANAGER_PORT:-19093}:9093" # networks: @@ -174,7 +261,7 @@ services: # ports: # - "${GRAFANA_PORT:-13000}:3000" # volumes: - # - ${DATA_DIR:-./}/components/grafana:/var/lib/grafana + # - "${DATA_DIR:-./}/components/grafana:/var/lib/grafana" # networks: # server: # ipv4_address: ${GRAFANA_NETWORK_ADDRESS:-172.28.0.11}