forked from juffalow/express-graphql-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (37 loc) · 874 Bytes
/
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
services:
mysqldb:
image: mysql
restart: unless-stopped
env_file: ./.env
environment:
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${DATABASE_USER}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DATABASE_PASSWORD}
ports:
- ${DATABASE_PORT}:3306
volumes:
- 'mysql_data:/mysql/data'
application:
build:
context: .
dockerfile: Dockerfile.dev
depends_on:
- mysqldb
restart: unless-stopped
env_file: ./.env
ports:
- ${PORT}:${PORT}
environment:
- DATABASE_HOST=mysqldb
- DATABASE_USER=$DATABASE_USER
- DATABASE_PASSWORD=$DATABASE_PASSWORD
- DATABASE_NAME=$DATABASE_NAME
- DATABASE_PORT=$DATABASE_PORT
links:
- mysqldb
volumes:
- "./src:/application/src"
volumes:
mysql_data:
driver: local