123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- version: '3'
- services:
- mysql:
- container_name: v-mysql
- # image: mysql/mysql-server:5.7
- image: mysql:5.7
- environment:
- MYSQL_DATABASE: test
- MYSQL_ROOT_PASSWORD: root
- MYSQL_ROOT_HOST: '%'
- ports:
- - "3306:3306"
- restart: always
- networks:
- - app-network
- redis:
- container_name: v-redis
- image: redis:7.2.3
- restart: unless-stopped
- # volumes:
- # - ./redis:/data
- ports:
- - 6379:6379
- networks:
- - app-network
- mongo:
- image: mongo:latest
- container_name: v-mongo
- restart: always
- # env_file: .env
- environment:
- - MONGO_INITDB_ROOT_USERNAME=root
- - MONGO_INITDB_ROOT_PASSWORD=example
- # volumes:
- # - mongo-data:/data/db
- networks:
- - app-network
- app:
- restart: always
- build:
- context: ./deploy/app
- dockerfile: Dockerfile
- image:
- container_name: v-app
- working_dir: /app
- volumes:
- - ./app:/app
- - ~/.m2:/root/.m2
- expose:
- - "8080"
- depends_on:
- - nginx
- - mysql
- command: mvn clean spring-boot:run -Dspring-boot.run.profiles=docker
- networks:
- default:
- external:
- name: v-net
-
- volumes:
- mysql_data:
- driver: local
- app_data:
- driver: local
|