-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (39 loc) · 1.03 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:
node:
build:
context: .
ports:
- 8080:8080
volumes:
- ./:/app
- /app/node_modules
env_file: .env
depends_on:
- mysql
mysql:
command: mysqld --init-file='/tmp/init_db/db.sql'
image: mysql:5.7
restart: always
environment:
# So you don't have to use root, but you can if you like
MYSQL_USER: 'user'
# You can use whatever password you like
MYSQL_PASSWORD: 'password'
# Password for root access
MYSQL_ROOT_PASSWORD: 'password'
ports:
# <Port exposed> : < MySQL Port running inside container>
- 3306:3306
volumes:
- ./init_db:/tmp/init_db
phpmyadmin:
image: phpmyadmin/phpmyadmin
depends_on:
- mysql
links:
- mysql:db
ports:
- 8181:80
environment:
MYSQL_PORT_3306_TCP_ADDR: mysql