mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
67 lines
1.8 KiB
Go
67 lines
1.8 KiB
Go
version: '3.3'
|
|
services:
|
|
master:
|
|
build:
|
|
context: ./dockerfiles/golang
|
|
command: /bin/bash -c "/app/bin/docker-start-master.sh && air -c .air.master.conf"
|
|
volumes:
|
|
- ./.crawlab/master:/root/.crawlab
|
|
- ./.crawlab/go/pkg/mod:/go/pkg/mod
|
|
- ../backend:/backend
|
|
- ../backend/go.mod.local:/backend/go.mod
|
|
- ../..:/libs/crawlab-team
|
|
- ../bin:/app/bin
|
|
- ../nginx:/etc/nginx/conf.d
|
|
- ../frontend/dist:/app/dist
|
|
environment:
|
|
CRAWLAB_NODE_MASTER: "Y"
|
|
CRAWLAB_NODE_NAME: "Master Node"
|
|
CRAWLAB_MONGO_HOST: "mongo"
|
|
ports:
|
|
- "9080:8080"
|
|
- "9000:8000"
|
|
depends_on:
|
|
- mongo
|
|
|
|
worker01:
|
|
build:
|
|
context: ./dockerfiles/golang
|
|
command: "air -c .air.worker.conf"
|
|
environment:
|
|
CRAWLAB_NODE_MASTER: "N"
|
|
CRAWLAB_NODE_NAME: "Worker Node 01"
|
|
CRAWLAB_GRPC_ADDRESS: "master"
|
|
CRAWLAB_FS_FILER_URL: "http://master:8080/api/filer"
|
|
volumes:
|
|
- ./.crawlab/worker01:/root/.crawlab
|
|
- ./.crawlab/go/pkg/mod:/go/pkg/mod
|
|
- ../backend:/backend
|
|
- ../backend/go.mod.local:/backend/go.mod
|
|
- ../..:/libs/crawlab-team
|
|
depends_on:
|
|
- master
|
|
|
|
worker02:
|
|
build:
|
|
context: ./dockerfiles/golang
|
|
command: "air -c .air.worker.conf"
|
|
environment:
|
|
CRAWLAB_NODE_MASTER: "N"
|
|
CRAWLAB_NODE_NAME: "Worker Node 01"
|
|
CRAWLAB_GRPC_ADDRESS: "master"
|
|
CRAWLAB_FS_FILER_URL: "http://master:8080/api/filer"
|
|
volumes:
|
|
- ./.crawlab/worker02:/root/.crawlab
|
|
- ./.crawlab/go/pkg/mod:/go/pkg/mod
|
|
- ../backend:/backend
|
|
- ../backend/go.mod.local:/backend/go.mod
|
|
- ../..:/libs/crawlab-team
|
|
depends_on:
|
|
- master
|
|
|
|
mongo:
|
|
image: mongo:4
|
|
restart: always
|
|
ports:
|
|
- "28017:27017"
|