-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (65 loc) · 1.33 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
x-common-variables: &common-variables
MYSQL_DATABASE: book_database
MYSQL_USER: MYSQL_USER
MYSQL_PASSWORD: MYSQL_PASSWORD
services:
mariadb:
image: "mariadb"
build:
dockerfile: Dockerfile
context: "./db"
container_name: "mariadb"
ports:
- "3306:3306"
environment:
<<: *common-variables
MYSQL_ROOT_PASSWORD: MYSQL_ROOT_PASSWORD
MYSQL_HOST: localhost
nginx:
depends_on:
- api
- client
restart: always
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- "80:80"
api:
build:
dockerfile: Dockerfile
context: "./books-node-backend"
depends_on:
- mariadb
volumes:
- /app/node_modules
- ./books-node-backend:/app
environment:
<<: *common-variables
MYSQL_HOST_IP: mariadb
ports:
- "3001:4000"
client:
stdin_open: true
environment:
- CHOKIDAR_USEPOLLING=true
build:
dockerfile: Dockerfile
context: ./books-react-frontend
volumes:
- /app/node_modules
- ./books-react-frontend:/app
ports:
- "3000:3000"
adminer:
image: adminer:latest
restart: unless-stopped
ports:
- 8000:8080
depends_on:
- mariadb
environment:
ADMINER_DEFAULT_SERVER: mariadb
# volumes:
# db-data:
# external: true