-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (44 loc) · 1.35 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
version: '3'
services:
mysql:
image: mysql:5.6
volumes:
- "./database/mysql:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
postgresql:
image: postgres
volumes:
- ./database/postgresql:/var/lib/postgresql
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
node:
build: .
ports:
- "2001:2001"
- "2002:2002"
- "2003:2003"
volumes:
- .:/app
environment:
MYSQL_HOST: mysql
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PORT: ${MYSQL_PORT}
MYSQL_DRIVER: ${MYSQL_DRIVER}
MYSQL_DATABASE: ${MYSQL_DATABASE}
POSTGRES_HOST: postgresql
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_DRIVER: ${POSTGRES_DRIVER}
POSTGRES_DB: ${POSTGRES_DB}
depends_on:
- mysql
- postgresql
command: npm start