-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (47 loc) · 1.32 KB
/
docker-compose.yml
File metadata and controls
49 lines (47 loc) · 1.32 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
version: '3'
services:
nodejs:
build:
context: .
dockerfile: ./docker/nodejs/Dockerfile
container_name: todo-nodejs
environment:
# application environment variables
DB_HOST: db
DB_USER: todoserver
DB_PASSWORD: todoserverpassword
DB_DATABASE: tododb
PORT: 1350
NODE_ENV: alterdb
#volumes:
# mount our directory to the working_dir
#- ./todo-application/todo-server:/todo-server
#- ./todo-application/todo-server/node_modules:/todo-server/node_modules
# expose:
# - "1350" #expose the application port
ports:
- "1350:1350"
command: ["./wait-for-it.sh", "db:1350", "--", "npm", "start"]
depends_on:
- db
db:
image: mariadb:10.3.7
container_name: "todo-nodejs-mariadb"
environment:
MYSQL_ROOT_PASSWORD: root
#MYSQL_USER: "todoserver"
#MYSQL_PASSWORD: "todoserverpassword"
ports:
- "3306:3306"
volumes:
- database:/var/lib/mysql
- /var/lib/mysql:/var/lib/mysql
#- ./bin/db_setup.sh:/docker-entrypoint-initdb.d/db_setup.sh
- ./docker/mysql:/docker-entrypoint-initdb.d
#command: "chmod +x /docker-entrypoint-initdb.d/db_setup.sh"
volumes:
database:
# networks:
# todo_sailsjs_network:
# driver: bridge
# - ./todo-application/todo-server:/todo-server