Skip to content

Commit

Permalink
1. 修复授权码问题 2. 去掉后端地址及监控数据库地址的配置 3. 为正常调度的任务会在半小时内尝试重新调度
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris-code committed Feb 21, 2022
1 parent f924a87 commit 5e3a43a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
16 changes: 7 additions & 9 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,23 @@ 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
# 监控系统端口配置
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=
19 changes: 12 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ 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过期时间 单位分钟
- SPIDER_IMAGE=${SPIDER_IMAGE} # 爬虫镜像
- 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" # 上传的项目挂载, 本地目录:容器路径
Expand Down Expand Up @@ -108,4 +108,9 @@ services:
- INFLUXDB_USER_PASSWORD=influx
ports:
- ${INFLUXDB_PORT_TCP}:8086
- ${INFLUXDB_PORT_UDP}:8089/udp
- ${INFLUXDB_PORT_UDP}:8089/udp

networks:
default:
name: feaplat
driver: overlay

0 comments on commit 5e3a43a

Please sign in to comment.