-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.dev.yml
68 lines (64 loc) · 1.49 KB
/
docker-compose.dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: "3.8"
services:
# Database
database_mysql_dev:
container_name: database_mysql_dev
build: ./database
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_DATABASE: "${MYSQL_DATABASE_NAME}"
MYSQL_USER: "${MYSQL_USER}"
MYSQL_PASSWORD: "${MYSQL_USER_PASSWORD}"
restart: always
ports:
- "3306:3306"
networks:
- backend_dev
volumes:
- data-volume_dev:/var/lib/mysql
# Backend
backend_node_dev:
build:
context: ./backend
dockerfile: ./docker/dev.Dockerfile
restart: always
volumes:
- ./backend/uploads:/usr/src/app/uploads
environment:
- NODE_DATABASE_HOST=database_mysql_dev
- NODE_DATABASE_PORT=3306
- NODE_DATABASE_USER=${MYSQL_USER}
- NODE_DATABASE_PASS=${MYSQL_USER_PASSWORD}
- NODE_DATABASE_DBNAME=${MYSQL_DATABASE_NAME}
restart: always
ports:
- "4008:4008"
networks:
- backend_dev
- frontend_dev
depends_on:
- database_mysql_dev
# Frontend
frontend_react_dev:
build:
context: ./frontend
dockerfile: ./docker/dev.Dockerfile
args:
- REACT_APP_API_URL= ${API_URL_DEV}
- REACT_APP_FRONTEND_URL= ${FRONTEND_URL_DEV}
ports:
- "80:80"
- "4012:9090"
networks:
- frontend_dev
depends_on:
- backend_node_dev
# Names for networks
networks:
backend_dev:
driver: bridge
frontend_dev:
driver: bridge
# Names for volumes
volumes:
data-volume_dev: