version: '1.0' services: #项目å称,用docker-composeåšç®¡ç†æ—¶ï¼Œæ¯ä¸ªé¡¹ç›®ç”¨è¿™é‡Œé…置的å称进行å•ç‹¬ç®¡ç† ## mysql mysql-db: # 指定容器的å称 container_name: mysql # 指定镜åƒå’Œç‰ˆæœ¬ image: mysql:8.0 ports: - "3306:3306" restart: always environment: # é…ç½®root密ç MYSQL_ROOT_PASSWORD: 123456 volumes: # 挂载数æ®ç›®å½• - "/sda2/mysql/data:/var/lib/mysql" # 挂载é…置文件目录 - "/sda2/mysql/conf:/etc/mysql/conf.d" ## redis redis: image: redis:latest container_name: redis restart: always ports: - 6379:6379 volumes: - ./redis-data:/data:rw ## nacos nacos: # æ ¹æ®éœ€è¦ä¿®æ”¹ç‰ˆæœ¬ image: nacos/nacos-server:2.3.2 container_name: nacos-standalone restart: always environment: - PREFER_HOST_MODE=hostname - MODE=standalone volumes: - ./nacos/logs/:/home/nacos/logs - ./nacos/data/:/home/nacos/data ports: - "8848:8848" depends_on: - mysql healthcheck: test: ["CMD","curl","-f","http://localhost:8848/nacos"] interval: 10s timeout: 30s retries: 3 ## xxl-job xxl-job: # æ ¹æ®éœ€è¦ä¿®æ”¹ç‰ˆæœ¬ image: xxl-job:latest container_name: xxl-job restart: always volumes: - /sda2/iailab/iailab-plat/xxl-job/logs/:/data/applogs ports: - "9090:9090" depends_on: - mysql # gateway: # #é•œåƒå,拉å–é•œåƒæ—¶ä¹Ÿæ˜¯ç”¨è¿™ä¸ªåå—ä½œä¸ºåœ°å€ # image: ic-gateway # container_name: ic-gateway # #打包路径,å³docker build的路径 # build: ./api/gateway/ # restart: always # #环境å˜é‡ # environment: # CONFIG_SERVER: 172.19.188.43:8848 #é…ç½®ä¸å¿ƒåœ°å€ # #挂载目录 # volumes: # - /etc/localtime:/etc/localtime:ro #时间åŒæ¥ # - ./api/gateway-lib:/home/beex-gateway/lib # - ./api/gateway/:/home/beex-gateway # - ./logs:/logs # #å¼€æ”¾ç«¯å£ # ports: # - "9990:9000" # - "9777:8777" # networks: # - 246-multi-tenant # depends_on: # nacos: # condition: service_healthy # healthcheck: # test: ["CMD","curl","-S","http://localhost:9000/doc.html#/beex-api-gateway/authenticate-controller/authenticateUsingGET"] # interval: 20s # timeout: 30s # retries: 3 # start_period: 20s