# Copyright 2022 vivo Communication Technology Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. version: "3" services: moonbox-mysql: container_name: moonbox-mysql build: context: ./mysql environment: MYSQL_ROOT_PASSWORD: 123456 ports: - 3307:3306 restart: always moonbox-elasticsearch: container_name: moonbox-elasticsearch image: elasticsearch:7.16.2 environment: - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - discovery.type=single-node ulimits: memlock: soft: -1 hard: -1 volumes: - ./elasticsearch/data:/usr/share/elasticsearch/data - ./elasticsearch/logs:/usr/share/elasticsearch/logs - ./elasticsearch/plugins:/usr/share/elasticsearch/plugins ports: - 9201:9200 - 9301:9300 restart: always moonbox-server: container_name: moonbox-server build: context: ./server ports: - 8081:8080 restart: always depends_on: - moonbox-mysql - moonbox-elasticsearch moonbox-web: container_name: moonbox-web build: context: ./web ports: - 9999:9999 restart: always depends_on: - moonbox-server