docker-compose.debug.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. version: '3'
  2. services:
  3. mysql:
  4. container_name: v-mysql
  5. # image: mysql/mysql-server:5.7
  6. image: mysql:5.7
  7. environment:
  8. MYSQL_DATABASE: test
  9. MYSQL_ROOT_PASSWORD: root
  10. MYSQL_ROOT_HOST: '%'
  11. ports:
  12. - "3306:3306"
  13. restart: always
  14. networks:
  15. - app-network
  16. redis:
  17. container_name: v-redis
  18. image: redis:7.2.3
  19. restart: unless-stopped
  20. # volumes:
  21. # - ./redis:/data
  22. ports:
  23. - 6379:6379
  24. networks:
  25. - app-network
  26. mongo:
  27. image: mongo:latest
  28. container_name: v-mongo
  29. restart: always
  30. # env_file: .env
  31. environment:
  32. - MONGO_INITDB_ROOT_USERNAME=root
  33. - MONGO_INITDB_ROOT_PASSWORD=example
  34. # volumes:
  35. # - mongo-data:/data/db
  36. networks:
  37. - app-network
  38. app:
  39. restart: always
  40. build:
  41. context: ./deploy/app
  42. dockerfile: Dockerfile
  43. image:
  44. container_name: v-app
  45. working_dir: /app
  46. volumes:
  47. - ./app:/app
  48. - ~/.m2:/root/.m2
  49. expose:
  50. - "8080"
  51. depends_on:
  52. - nginx
  53. - mysql
  54. command: mvn clean spring-boot:run -Dspring-boot.run.profiles=docker
  55. networks:
  56. default:
  57. external:
  58. name: v-net
  59. volumes:
  60. mysql_data:
  61. driver: local
  62. app_data:
  63. driver: local