docker-compose.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # 主程序
  2. # # 该镜像需要依赖的基础镜像 jdk14
  3. # FROM openjdk:14
  4. # # 将当前目录下的jar包复制到docker容器的/目录下
  5. # ADD DigitalMap-0.0.1-SNAPSHOT.jar /DigitalMap.jar
  6. # ADD logback.xml /logback.xml
  7. # EXPOSE 8089
  8. # # 指定docker容器启动时运行jar包
  9. # ENTRYPOINT ["java", "-jar","/DigitalMap.jar"]
  10. version: '0'
  11. services:
  12. frontend:
  13. build: manage_platform
  14. restart: always
  15. ports:
  16. - 8001:8000
  17. depends_on:
  18. - backend
  19. environment:
  20. - SERVER_URL=http://backend:8090
  21. - MINIO_URL=http://minio:9000
  22. - CLIENT_PORT=8000
  23. networks:
  24. - my_network
  25. backend:
  26. # build: .
  27. # build:
  28. # context: .
  29. # dockerfile: Dockerfile
  30. # container_name: spring-backend
  31. image: registry.cn-hangzhou.aliyuncs.com/vc-2024/vc-backend:1.1.0
  32. restart: always
  33. volumes:
  34. - ./backend_data/:/backend
  35. ports:
  36. - 8090:8090
  37. depends_on:
  38. - mysql
  39. environment:
  40. TZ: Asia/Shanghai
  41. MYSQL_URL: jdbc:mysql://mysql-db:3306/vehicle?useSSL=false&allowPublicKeyRetrieval=true&serverTimeZone=UTC
  42. MYSQL_USERNAME: root
  43. MYSQL_PASSWORD: colin123
  44. MINIO_URL: http://localhost:9000 # 部署时要改成服务器ip
  45. MINIO_BUCKET: folder
  46. MINIO_ACCESS_KEY: Jonny
  47. MINIO_SECRET_KEY: minioadmin
  48. networks:
  49. - my_network
  50. mysql:
  51. image: mysql:8.0.31
  52. container_name: mysql-db
  53. restart: always
  54. environment:
  55. MYSQL_ROOT_PASSWORD: colin123
  56. MYSQL_DATABASE: vehicle
  57. # MYSQL_USER: root
  58. MYSQL_PASSWORD: colin123
  59. ports:
  60. - "3307:3306"
  61. volumes:
  62. - ./sql:/sql
  63. - ./mysql_data:/var/lib/mysql
  64. networks:
  65. - my_network
  66. minio:
  67. image: minio/minio
  68. container_name: minio
  69. restart: always
  70. ports:
  71. - "9000:9000"
  72. - "5001:5001"
  73. volumes:
  74. - ./minio_data:/data
  75. environment:
  76. - MINIO_ROOT_USER=Jonny
  77. - MINIO_ROOT_PASSWORD=minioadmin
  78. command: server /data --console-address ":5001"
  79. networks:
  80. - my_network
  81. model_accuracy_backend:
  82. image: registry.cn-hangzhou.aliyuncs.com/vc-2024/model_accuracy-backend:0.0.6
  83. restart: always
  84. ports:
  85. - 5000:5000
  86. volumes:
  87. - ./model_accuracy/output:/app/output
  88. - ./model_accuracy/config.yml:/app/config.yml
  89. # - ./model_accuracy/lemon_master:/app/lemon_master
  90. deploy:
  91. resources:
  92. reservations:
  93. devices:
  94. - driver: "nvidia"
  95. count: "all"
  96. capabilities: [ "gpu" ]
  97. networks:
  98. - my_network
  99. networks:
  100. my_network: