-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 894 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (42 loc) · 894 Bytes
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
version: '3.9'
services:
mysql:
image: mysql:5.7
container_name: database
volumes:
- ./dbfiles:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: chatdb
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot", "-padmin"]
timeout: 20s
retries: 10
node:
build:
context: ./server
dockerfile: Dockerfile
container_name: backend
ports:
- "8081:8081"
volumes:
- ./server:/usr/src/app
depends_on:
mysql:
condition: service_healthy
stdin_open: true
tty: true
react:
build:
context: ./client
dockerfile: Dockerfile
container_name: frontend
ports:
- "8080:8080"
volumes:
- ./client:/usr/src/app
depends_on:
node:
condition: service_started
stdin_open: true
tty: true