updated docker-compose.yml

This commit is contained in:
Marvin Zhang
2019-07-30 20:15:49 +08:00
parent bf387354e0
commit 312c565b18
4 changed files with 24 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
2. [直接部署](https://tikazyq.github.io/crawlab/Installation/Direct.md)(了解内核)
### 要求Docker
- Docker
- Docker 18.03+
- Redis
- MongoDB 3.6+
@@ -48,9 +48,17 @@ docker run -d --rm --name crawlab \
tikazyq/crawlab:0.3.0
```
当然也可以用`docker-compose`来一键启动甚至不用配置MongoDB和Redis数据库。
```bash
docker-compose up
```
Docker部署的详情请见[相关文档](https://tikazyq.github.io/crawlab/Installation/Docker.md)。
### 直接部署
请参考文档
请参考[相关文档](https://tikazyq.github.io/crawlab/Installation/Direct.md)
## 截图

View File

@@ -2,8 +2,9 @@ version: '3.3'
services:
master:
image: tikazyq/crawlab:latest
container_name: crawlab
container_name: crawlab-master
environment:
CRAWLAB_API_ADDRESS: "192.168.99.100:8000"
CRAWLAB_SERVER_MASTER: "Y"
CRAWLAB_MONGO_HOST: "mongo"
CRAWLAB_REDIS_ADDRESS: "redis:6379"
@@ -13,6 +14,16 @@ services:
depends_on:
- mongo
- redis
worker:
image: tikazyq/crawlab:latest
container_name: crawlab-worker
environment:
CRAWLAB_SERVER_MASTER: "N"
CRAWLAB_MONGO_HOST: "mongo"
CRAWLAB_REDIS_ADDRESS: "redis:6379"
depends_on:
- mongo
- redis
mongo:
image: mongo:latest
restart: always

View File

@@ -1,4 +1,4 @@
docker run -d --rm --name crawlab \
docker run -d --restart always --name crawlab \
-e CRAWLAB_REDIS_ADDRESS=192.168.99.1:6379 \
-e CRAWLAB_MONGO_HOST=192.168.99.1 \
-e CRAWLAB_SERVER_MASTER=Y \

View File

@@ -1,4 +1,4 @@
docker run --rm --name crawlab \
docker run --restart always --name crawlab \
-e CRAWLAB_REDIS_ADDRESS=192.168.99.1:6379 \
-e CRAWLAB_MONGO_HOST=192.168.99.1 \
-e CRAWLAB_SERVER_MASTER=N \