# 主程序 # # 该镜像需要依赖的基础镜像 jdk14 # FROM openjdk:14 # # 将当前目录下的jar包复制到docker容器的/目录下 # ADD DigitalMap-0.0.1-SNAPSHOT.jar /DigitalMap.jar # ADD logback.xml /logback.xml # EXPOSE 8089 # # 指定docker容器启动时运行jar包 # ENTRYPOINT ["java", "-jar","/DigitalMap.jar"] version: '0' services: frontend: build: manage_platform restart: always ports: - 8001:8000 depends_on: - backend environment: - SERVER_URL=http://backend:8090 - MINIO_URL=http://minio:9000 - MODEL_ACCURACY_URL=http://model_accuracy_backend:5000 - CLIENT_PORT=8000 networks: - my_network backend: # build: . # build: # context: . # dockerfile: Dockerfile # container_name: spring-backend image: registry.cn-hangzhou.aliyuncs.com/vc-2024/vc-backend:1.1.0 restart: always volumes: - ./backend_data/:/backend ports: - 8090:8090 depends_on: - mysql environment: TZ: Asia/Shanghai MYSQL_URL: jdbc:mysql://mysql-db:3306/vehicle?useSSL=false&allowPublicKeyRetrieval=true&serverTimeZone=UTC MYSQL_USERNAME: root MYSQL_PASSWORD: colin123 MINIO_URL: http://10.1.1.228:9000 # 部署时要改成服务器ip MINIO_BUCKET: files MINIO_ACCESS_KEY: Jonny MINIO_SECRET_KEY: minioadmin networks: - my_network mysql: image: mysql:8.0.31 container_name: mysql-db restart: always environment: MYSQL_ROOT_PASSWORD: colin123 MYSQL_DATABASE: vehicle # MYSQL_USER: root MYSQL_PASSWORD: colin123 ports: - "3307:3306" volumes: - ./sql:/sql - ./server/mysql_data:/var/lib/mysql networks: - my_network minio: image: minio/minio container_name: minio restart: always ports: - "9000:9000" - "5001:5001" volumes: - ./server/minio_data:/data environment: - MINIO_ROOT_USER=Jonny - MINIO_ROOT_PASSWORD=minioadmin command: server /data --console-address ":5001" networks: - my_network model_accuracy_backend: image: registry.cn-hangzhou.aliyuncs.com/vc-2024/model_accuracy-backend:0.0.7 restart: always ports: - 5000:5000 volumes: - ./model_accuracy/output:/app/output - ./model_accuracy/config.yml:/app/config.yml # - ./model_accuracy/lemon_master:/app/lemon_master deploy: resources: reservations: devices: - driver: "nvidia" count: "all" capabilities: [ "gpu" ] networks: - my_network networks: my_network: