mongodb crawlab

This commit is contained in:
2022-11-23 11:09:43 +08:00
parent 3461813bf1
commit c17c8137f2
3 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
version: '3.3'
services:
master:
image: crawlabteam/crawlab
container_name: crawlab_master
restart: unless-stopped
environment:
CRAWLAB_NODE_MASTER: Y # Y: master node
CRAWLAB_MONGO_HOST: mongo # mongo host address. In the docker compose network, directly refer to the service name
CRAWLAB_MONGO_PORT: 27017 # mongo port
CRAWLAB_MONGO_DB: crawlab # mongo database
CRAWLAB_MONGO_USERNAME: username # mongo username
CRAWLAB_MONGO_PASSWORD: password # mongo password
CRAWLAB_MONGO_AUTHSOURCE: admin # mongo auth source
volumes:
- "./data/master:/data" # persistent crawlab data
ports:
- "8080:8080" # exposed api port
- "9666:9666" # exposed grpc port
networks:
nginx:
aliases:
- crawlab-master
networks:
nginx:
external: true

View File

@@ -0,0 +1,21 @@
version: '3.3'
services:
# worker node
worker:
image: crawlabteam/crawlab
container_name: crawlab_worker
restart: unless-stopped
environment:
CRAWLAB_NODE_MASTER: N # N: worker node
CRAWLAB_GRPC_ADDRESS: crawlab-master:9666 # grpc address
CRAWLAB_FS_FILER_URL: http://crawlab-master:8080/api/filer # seaweedfs api
volumes:
- "./data/worker:/data" # persistent crawlab data
networks:
nginx:
aliases:
- crawlab-worker
networks:
nginx:
external: true

View File

@@ -0,0 +1,21 @@
version: '3.3'
services:
mongo:
image: mongo:4.2
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: username # mongo username
MONGO_INITDB_ROOT_PASSWORD: password # mongo password
volumes:
- "./data:/data/db" # persistent mongo data
ports:
- "27017:27017" # expose mongo port to host machine
networks:
nginx:
aliases:
- mongodb
networks:
nginx:
external: true