docker-compose.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. - MODEL_ACCURACY_URL=http://model_accuracy_backend:5000
  23. - CLIENT_PORT=8000
  24. networks:
  25. - my_network
  26. backend:
  27. # build: .
  28. # build:
  29. # context: .
  30. # dockerfile: Dockerfile
  31. # container_name: spring-backend
  32. image: registry.cn-hangzhou.aliyuncs.com/vc-2024/vc-backend:1.1.0
  33. restart: always
  34. volumes:
  35. - ./backend_data/:/backend
  36. ports:
  37. - 8090:8090
  38. depends_on:
  39. - mysql
  40. environment:
  41. TZ: Asia/Shanghai
  42. MYSQL_URL: jdbc:mysql://mysql-db:3306/vehicle?useSSL=false&allowPublicKeyRetrieval=true&serverTimeZone=UTC
  43. MYSQL_USERNAME: root
  44. MYSQL_PASSWORD: colin123
  45. MINIO_URL: http://10.1.1.228:9000 # 部署时要改成服务器ip
  46. MINIO_BUCKET: files
  47. MINIO_ACCESS_KEY: Jonny
  48. MINIO_SECRET_KEY: minioadmin
  49. networks:
  50. - my_network
  51. mysql:
  52. image: mysql:8.0.31
  53. container_name: mysql-db
  54. restart: always
  55. environment:
  56. MYSQL_ROOT_PASSWORD: colin123
  57. MYSQL_DATABASE: vehicle
  58. # MYSQL_USER: root
  59. MYSQL_PASSWORD: colin123
  60. ports:
  61. - "3307:3306"
  62. volumes:
  63. - ./sql:/sql
  64. - ./server/mysql_data:/var/lib/mysql
  65. networks:
  66. - my_network
  67. minio:
  68. image: minio/minio
  69. container_name: minio
  70. restart: always
  71. ports:
  72. - "9000:9000"
  73. - "5001:5001"
  74. volumes:
  75. - ./server/minio_data:/data
  76. environment:
  77. - MINIO_ROOT_USER=Jonny
  78. - MINIO_ROOT_PASSWORD=minioadmin
  79. command: server /data --console-address ":5001"
  80. networks:
  81. - my_network
  82. model_accuracy_backend:
  83. image: registry.cn-hangzhou.aliyuncs.com/vc-2024/model_accuracy-backend:0.0.7
  84. restart: always
  85. ports:
  86. - 5000:5000
  87. volumes:
  88. - ./model_accuracy/output:/app/output
  89. - ./model_accuracy/config.yml:/app/config.yml
  90. # - ./model_accuracy/lemon_master:/app/lemon_master
  91. deploy:
  92. resources:
  93. reservations:
  94. devices:
  95. - driver: "nvidia"
  96. count: "all"
  97. capabilities: [ "gpu" ]
  98. networks:
  99. - my_network
  100. networks:
  101. my_network: