docker-compose.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. version: '3.8'
  2. # networks:
  3. # network:
  4. # ipam:
  5. # driver: default
  6. # config:
  7. # - subnet: '177.7.0.0/16'
  8. services:
  9. # exam:
  10. # restart: always
  11. # image: registry.cn-chengdu.aliyuncs.com/infish/exam:1.0.0
  12. # container_name: exam
  13. # ports:
  14. # - "3001:3000"
  15. # networks:
  16. # network:
  17. # # 在network网络下的容器内部的Ipv4地址
  18. # ipv4_address: 177.7.0.12
  19. # mysql:
  20. # restart: always
  21. # image: mysql:8.0
  22. # container_name: mysql_exam
  23. # environment:
  24. # - MYSQL_ROOT_PASSWORD=zyhd2022
  25. # - MYSQL_DATABASE=exam
  26. # - TZ=Asia/Shanghai
  27. # volumes:
  28. # - ./datadir:/var/lib/mysql
  29. # - ./conf/my.cnf:/etc/my.cnf
  30. # - ./olddata/:/docker-entrypoint-initdb.d
  31. # ports:
  32. # - 3306:3306
  33. # networks:
  34. # network:
  35. # # 在network网络下的容器内部的Ipv4地址
  36. # ipv4_address: 177.7.0.13
  37. nats:
  38. restart: always
  39. image: nats:latest
  40. container_name: nats_exam
  41. ports:
  42. # - 4223:4222
  43. - 14223:4222
  44. command: "--js --http_port 8222"
  45. # networks:
  46. # network:
  47. # # 在network网络下的容器内部的Ipv4地址
  48. # ipv4_address: 177.7.0.14