-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (66 loc) · 1.65 KB
/
docker-compose.yml
File metadata and controls
71 lines (66 loc) · 1.65 KB
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
version: '3.8'
volumes:
mysql_volume:
books_api_volume:
books_collection:
networks:
books_api_network:
driver: bridge
services:
mysql:
image: mysql:8.0.29
container_name: mysql
command: --log_bin_trust_function_creators=1 --default-authentication-plugin=mysql_native_password --secure-file-priv=''
networks:
- books_api_network
volumes:
- mysql_volume:/var/lib/mysql
- ./mysql/my.cnf:/etc/mysql/my.cnf
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=books
- MYSQL_PASSWORD=books
- MYSQL_DATABASE=books_collection
ports:
- 3306:3306
books_api:
container_name: books_api
restart: always
build:
context: ./booksApi
target: dependencies
ports:
- ${PORT}:${PORT}
- 9229:9229
env_file:
- .env
volumes:
- ./booksApi:/home/node/app/booksApi
command: dumb-init node ace serve --watch --node-args="--inspect=0.0.0.0"
networks:
- books_api_network
depends_on:
- mysql
environment:
PORT: ${PORT}
HOST: ${HOST}
NODE_ENV: ${NODE_ENV}
APP_KEY: ${APP_KEY}
DRIVE_DISK: ${DRIVE_DISK}
DB_CONNECTION: ${DB_CONNECTION}
MYSQL_PORT: ${MYSQL_PORT}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DB_NAME: ${MYSQL_DB_NAME}
HASH_DRIVER: ${HASH_DRIVER}
MYSQL_HOST: mysql
books_collection:
container_name: books_collection
build:
context: ./books_collection
dockerfile: Dockerfile
ports:
- "2200:2200"
volumes:
- ./books_collection:/usr/src/app/
- /usr/src/app/books_collection/node_modules