-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
123 lines (115 loc) · 2.71 KB
/
docker-compose.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: '3.8'
services:
spring-be:
container_name: dashNet-spring
profiles:
- 'no-admin'
- 'spring-mysql'
- 'spring-mysql-admin'
- 'default'
build:
context: .
dockerfile: ./docker/Spring.Dockerfile
restart: unless-stopped
deploy:
mode: replicated
replicas: ${SPRING_REPLICAS}
ports:
- ${SPRING_PORT}:8080
volumes:
- .:/app
networks:
- dash-net
depends_on:
- mysql-db
environment:
- SPRING_DATASOURCE_URL=${SPRING_DB_URL}
- SPRING_DATASOURCE_USERNAME=${SPRING_DB_USERNAME}
- SPRING_DATASOURCE_PASSWORD=${SPRING_DB_PASSWORD}
frontend-production:
container_name: dashNet-web-production
build:
context: .
dockerfile: docker/React.Production.Dockerfile
ports:
- ${FE_PRODUCTION_PORT}:80
profiles:
- 'production'
frontend-development:
container_name: dashNet-web-development
profiles:
- 'react'
- 'no-admin'
- 'default'
build:
context: .
dockerfile: docker/React.Dockerfile
ports:
- ${NODE_PORT}:3000
restart: unless-stopped
stdin_open: true
tty: true
deploy:
mode: replicated
replicas: ${NODE_REPLICAS}
# volumes:
# - './app/web/src:/app/src' TODO: Volumes problem on Windows machine
environment:
- FAST_REFRESH=false
- WDS_SOCKET_PORT=${NODE_PORT}
- CHOKIDAR_USEPOLLING=${NODE_POLLING}
- WATCHPACK_POLLING=${NODE_POLLING}
mysql-db:
build:
context: .
dockerfile: docker/MySql.Dockerfile
container_name: dashNet-mysql
profiles:
- 'mysql'
- 'no-admin'
- 'spring-mysql'
- 'mysql-admin'
- 'spring-mysql-admin'
- 'default'
image: dashnet-mysql-image
command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
deploy:
mode: replicated
replicas: ${MYSQL_REPLICAS}
ports:
- ${MYSQL_PORT}:3306
environment:
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DB_NAME}
volumes:
- "dashnet-mysql:/var/lib/mysql"
networks:
- dash-net
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: dashNet-php-my-admin
profiles:
- 'phpadmin'
- 'mysql-admin'
- 'spring-mysql-admin'
- 'default'
links:
- mysql-db
environment:
PMA_HOST: ${PMA_HOST}
PMA_PORT: ${MYSQL_PORT}
PMA_ARBITRARY: ${PMA_ARBITRARY}
restart: unless-stopped
deploy:
mode: replicated
replicas: ${PMA_REPLICAS}
ports:
- ${PMA_PORT}:80
networks:
- dash-net
networks:
dash-net: { }
volumes:
dashnet-mysql: