-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (38 loc) · 1.08 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
version: "3"
services:
app:
container_name: app-api
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
ports:
- ${PORT}:${PORT}
volumes:
- .:/app
- "/app/node_modules"
depends_on:
- mysql_server
environment:
- PORT=${PORT}
- BCRPYT_COST=${BCRPYT_COST}
- JWT_KEY=${JWT_KEY}
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_LOCAL_PORT=${MYSQL_LOCAL_PORT}
mysql_server:
container_name: mysql_server
image: mysql:5.7.31
command: --default-authentication-plugin=mysql_native_password --sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER --explicit_defaults_for_timestamp
restart: always
ports:
- ${MYSQL_LOCAL_PORT}:${MYSQL_LOCAL_PORT}
environment:
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ${PWD}/db:/var/lib/mysql