version: '3.8' # networks: # network: # ipam: # driver: default # config: # - subnet: '177.7.0.0/16' services: # exam: # restart: always # image: registry.cn-chengdu.aliyuncs.com/infish/exam:1.0.0 # container_name: exam # ports: # - "3001:3000" # networks: # network: # # 在network网络下的容器内部的Ipv4地址 # ipv4_address: 177.7.0.12 # mysql: # restart: always # image: mysql:8.0 # container_name: mysql_exam # environment: # - MYSQL_ROOT_PASSWORD=zyhd2022 # - MYSQL_DATABASE=exam # - TZ=Asia/Shanghai # volumes: # - ./datadir:/var/lib/mysql # - ./conf/my.cnf:/etc/my.cnf # - ./olddata/:/docker-entrypoint-initdb.d # ports: # - 3306:3306 # networks: # network: # # 在network网络下的容器内部的Ipv4地址 # ipv4_address: 177.7.0.13 nats: restart: always image: nats:latest container_name: nats_exam ports: # - 4223:4222 - 14223:4222 command: "--js --http_port 8222" # networks: # network: # # 在network网络下的容器内部的Ipv4地址 # ipv4_address: 177.7.0.14