Zkt22/z3/fruitapp-main/docker-compose.yml

56 lines
1.0 KiB
YAML
Raw Normal View History

2022-05-22 10:40:18 +00:00
version: "3.8"
services:
backend:
build:
context: ./fruitapp-backend
dockerfile: Dockerfile
container_name: fruitapp-backend
env_file:
- ./fruitapp-backend/.env
command: "bash scripts/entrypoint.sh"
ports:
- "8001:5000"
volumes:
- ./fruitapp-backend:/app
depends_on:
- db
restart: unless-stopped
networks:
- main
db:
image: mysql:5.7.22
container_name: fruitapp-db
restart: unless-stopped
env_file:
- ./fruitapp-backend/.env
volumes:
- msql-data:/var/lib/mysql
ports:
- "33067:3306"
networks:
- main
web:
build:
context: ./fruitapp-frontend
dockerfile: .docker/dev/Dockerfile
container_name: fruitapp-frontend
ports:
- 4200:4200
volumes:
- ./fruitapp-frontend:/app
command: >
bash -c "cp -rfu /cache/node_modules/. /app/node_modules/ && ng serve --host=0.0.0.0 --aot"
depends_on:
- db
- backend
networks:
- main
volumes:
msql-data:
networks:
main: