# 先创建讯网络: # docker network create --driver=bridge kykms_network version: '3' services: kykms-mysql: build: context: ./DB environment: MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_HOST: '%' TZ: Asia/Shanghai restart: always container_name: kykms-mysql image: mysql:comm volumes: - ./docker/mysql/data:/var/lib/mysql - ./docker/mysql/log:/var/log/mysql command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --explicit_defaults_for_timestamp=true --lower_case_table_names=1 --max_allowed_packet=128M ports: - 3306:3306 networks: kykms_network: kykms-redis: image: redis:comm build: context: ./redis ports: - 6379:6379 restart: always container_name: kykms-redis networks: kykms_network: kykms-ES: image: elasticsearch:comm build: context: ./ES restart: always container_name: kykms-ES environment: discovery.type: single-node ES_JAVA_OPTS: "-Xms512m -Xmx512m" TZ: Asia/Shanghai ports: - 9200:9200 - 9300:9300 networks: kykms_network: kykms: build: context: ./jeecg-boot-module-system image: kykms:comm container_name: kykms environment: - TZ=Asia/Shanghai - LANG=en_US.UTF-8 depends_on: - kykms-mysql - kykms-redis - kykms-ES ports: - "8080:8080" networks: kykms_network: restart: always command: java -jar ./jeecg-boot-module-system-2.4.5.jar 2>&1 & kykms-nginx: build: context: ../ant-design-vue-jeecg image: kykms-nginx:comm depends_on: - kykms container_name: kykms-nginx privileged: true ports: - "80:80" volumes: - ./docker/nginx/conf.d/:/etc/nginx/conf.d/ - ./docker/nginx/log:/var/log/nginx networks: kykms_network: restart: always networks: kykms_network: external: true