From 5e3a43aa8cc670f18aaa1821ddf9114f409de0ae Mon Sep 17 00:00:00 2001 From: Boris <564773807@qq.com> Date: Mon, 21 Feb 2022 12:55:42 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E5=A4=8D=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E7=A0=81=E9=97=AE=E9=A2=98=202.=20=E5=8E=BB=E6=8E=89=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E5=9C=B0=E5=9D=80=E5=8F=8A=E7=9B=91=E6=8E=A7=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E5=9C=B0=E5=9D=80=E7=9A=84=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=203.=20=E4=B8=BA=E6=AD=A3=E5=B8=B8=E8=B0=83=E5=BA=A6=E7=9A=84?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=BC=9A=E5=9C=A8=E5=8D=8A=E5=B0=8F=E6=97=B6?= =?UTF-8?q?=E5=86=85=E5=B0=9D=E8=AF=95=E9=87=8D=E6=96=B0=E8=B0=83=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 16 +++++++--------- docker-compose.yaml | 19 ++++++++++++------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.env b/.env index 01c99f1..51d35f3 100644 --- a/.env +++ b/.env @@ -9,9 +9,9 @@ REDIS_PORT=6379 # 后端worker数 BACKEND_WORKER=1 # 前端镜像 -FRONT_IMAGE=registry.cn-hangzhou.aliyuncs.com/feapderd/feapder_front:1.7 +FRONT_IMAGE=registry.cn-hangzhou.aliyuncs.com/feapderd/feapder_front:1.8 # 后端镜像 -BACKEND_IMAGE=registry.cn-hangzhou.aliyuncs.com/feapderd/feapder_backend:2.4 +BACKEND_IMAGE=registry.cn-hangzhou.aliyuncs.com/feapderd/feapder_backend:2.5 # 爬虫镜像 SPIDER_IMAGE=registry.cn-hangzhou.aliyuncs.com/feapderd/feapder:1.9 # 监控系统端口配置 @@ -19,15 +19,13 @@ INFLUXDB_PORT_TCP=8086 INFLUXDB_PORT_UDP=8089 GRAFANA_PORT=3001 -# 下面这些配置可在管理系统页面上配置,这里不用改 -# 服务端部署的服务器所在的内网IP,用于爬虫节点通讯 -BACKEND_IP=服务端内网IP -# 授权码 -AUTHORIZATION_CODE= -# INFLUXDB 数据库配置 -INFLUXDB_HOST=服务端内网IP +# 监控数据库 INFLUXDB 配置 INFLUXDB_DB=feapder INFLUXDB_ADMIN_USER=root INFLUXDB_ADMIN_PASSWORD=root + +# 下面这些配置可在feaplat管理系统页面上配置,这里不用改 +# 授权码 +AUTHORIZATION_CODE= # git ssh 私钥, 直接复制密钥的值 换行改为空格 GIT_SSH_PRIVATE_KEY= diff --git a/docker-compose.yaml b/docker-compose.yaml index 74b5cd0..eaaaac9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -21,8 +21,8 @@ services: ports: - ${BACKEND_PORT}:${BACKEND_PORT} # 后端端口 (自定义端口:8000) environment: - - FEAPDER_BACKEND_URL=http://${BACKEND_IP}:${BACKEND_PORT} # **必填 服务端内网地址 ;端口需与自定义端口对上 - - AUTHORIZATION_CODE=${AUTHORIZATION_CODE} # **必填 授权码 + - FEAPDER_BACKEND_URL=http://feapder_backend:${BACKEND_PORT} + - AUTHORIZATION_CODE=${AUTHORIZATION_CODE} # 授权码 - DB_URL=mysql+pymysql://root:root123@mysql:3306/feapder_platform?charset=utf8mb4 # 后端数据库配置 - REDIS_DB_URL=redis://:feapderYYDS@redis:6379/0 # redis数据库连接配置 redis://[[username]:[password]]@[host]:[port]/[db] - ACCESS_TOKEN_EXPIRE_MINUTES=1440 # 管理系统账号cookie过期时间 单位分钟 @@ -30,16 +30,16 @@ services: - SPIDER_AUTO_PULL_IMAGE=1 # 是否自动拉取镜像 否则需要在爬虫节点手动 docker pull 爬虫镜像,为了加快启动速度,可以设置0 - SPIDER_ENV={} # 爬虫环境变量 值为json类型 # 爬虫容器启动参数,支持的参数使用 docker service create --help 查看 - - SPIDER_RUN_ARGS={} + - SPIDER_RUN_ARGS={"--network":"feaplat"} # git ssh 私有密钥,不填则使用默认的 - GIT_SSH_PRIVATE_KEY=${GIT_SSH_PRIVATE_KEY} # 监控配置 - - INFLUXDB_HOST=${INFLUXDB_HOST} + - INFLUXDB_HOST=feapder_influxdb - INFLUXDB_DB=${INFLUXDB_DB} - INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER} - INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD} - - INFLUXDB_PORT_TCP=${INFLUXDB_PORT_TCP} - - INFLUXDB_PORT_UDP=${INFLUXDB_PORT_UDP} + - INFLUXDB_PORT_TCP=8086 + - INFLUXDB_PORT_UDP=8089 volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "~/data/feapder/projects:/projects" # 上传的项目挂载, 本地目录:容器路径 @@ -108,4 +108,9 @@ services: - INFLUXDB_USER_PASSWORD=influx ports: - ${INFLUXDB_PORT_TCP}:8086 - - ${INFLUXDB_PORT_UDP}:8089/udp \ No newline at end of file + - ${INFLUXDB_PORT_UDP}:8089/udp + +networks: + default: + name: feaplat + driver: overlay \ No newline at end of file