-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
60 lines (58 loc) · 1.22 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# reference: https://yeasy.gitbooks.io/docker_practice/
version: "3"
services:
redis:
ports:
- "6379:6379"
restart: always
build:
context: ./redis
dockerfile: Dockerfile
container_name: pp_redis
volumes:
- "./redis/redis.conf:/etc/redis/redis.conf"
- "/data/redis/:/redis/data"
env_file: ./config/common.env
command:
- /bin/sh
- -c
- |
redis-server --requirepass $REDIS_PASS
expose:
- "6379"
mongo:
ports:
- "27017:27017"
restart: always
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: $MONGO_USER
MONGO_INITDB_ROOT_PASSWORD: $MONGO_PASS
volumes:
- "/data/mongo:/data/db"
scrawler:
depends_on:
- mongo
build:
context: .
dockerfile: Dockerfile
container_name: pp_scrawler
env_file: ./config/common.env
volumes:
- "./logs/:/home/pptruser/project/logs"
- "./download/:/home/pptruser/project/download"
command:
ports:
- "8888:8888"
expose:
- "8888"
command:
- /bin/sh
- -c
- |
# node src/index.js -s zhihu
pm2-runtime pm2.json
# tty: true
# stdin_open: true
links:
- redis