Skip to content

Commit 34e9333

Browse files
FreaxFreax
authored andcommitted
调整文件位置
1 parent 17b6ff6 commit 34e9333

File tree

1 file changed

+23
-28
lines changed

1 file changed

+23
-28
lines changed

docker-compose.yml

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,38 @@
11
version: '2'
22
services:
33
web:
4-
container_name: node-app
4+
container_name: node.js
55
image: node
6+
env_file:
7+
- ./docker/node.js/node.env
8+
- ./docker/mysql/mysql.env
9+
- ./docker/.env
10+
command: node --harmony --debug app.js
611
ports:
712
- "3000:3000"
813
- "5858:5858"
914
volumes:
1015
- .:/code
11-
command: node --harmony --debug app.js
12-
dns:
13-
- 176.80.80.80
14-
- 8.8.8.8
15-
env_file:
16-
- ./node.env
1716
working_dir: /code
18-
links:
19-
- db
20-
- redis
21-
- mongo
2217
depends_on:
23-
- redis
24-
- db
25-
- mongo
26-
redis:
27-
image: redis
28-
env_file:
29-
- ./redis.env
30-
volumes:
31-
- .data/redis/data:/data
32-
command: redis-server --requirepass node-app
33-
db:
18+
- mysql
19+
- mongo
20+
- redis
21+
mysql:
22+
container_name: ${DB_HOST}
3423
image: mysql
3524
env_file:
36-
- ./mysql.env
25+
- ./docker/mysql/mysql.env
26+
volumes:
27+
- ./docker/mysql/data:/var/lib/mysql
28+
- ./docker/mysql/etc:/etc/mysql/conf.d
29+
redis:
30+
image: redis
31+
container_name: ${REDIS_HOST}
3732
volumes:
38-
- .data/mysql/data/:/var/lib/mysql
39-
- .data/mysql/etc:/etc/mysql/conf.d
33+
- ./docker/redis/data:/data
4034
mongo:
41-
image: mongo
42-
volumes:
43-
- .data/mongo/data:/data/db
35+
image: mongo
36+
container_name: ${MONGO_HOST}
37+
volumes:
38+
- ./docker/mongo/data:/data/db

0 commit comments

Comments
 (0)