Skip to content

Commit

Permalink
支持修改后端及监控数据库地址
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris-code committed Apr 13, 2022
1 parent cf62de6 commit ff0cc20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ INFLUXDB_PORT_TCP=8086
INFLUXDB_PORT_UDP=8089
GRAFANA_PORT=3001

# 后端地址及监控数据库地址,若爬虫节点与后端连不上,则将此处的值都改成内网ip即可
BACKEND_HOST=feapder_backend
INFLUXDB_HOST=feapder_influxdb

# 监控数据库 INFLUXDB 配置
INFLUXDB_DB=feapder
INFLUXDB_ADMIN_USER=root
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
ports:
- ${BACKEND_PORT}:${BACKEND_PORT} # 后端端口 (自定义端口:8000)
environment:
- FEAPDER_BACKEND_URL=http://feapder_backend:${BACKEND_PORT}
- FEAPDER_BACKEND_URL=http://${BACKEND_HOST}:${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]
Expand All @@ -34,7 +34,7 @@ services:
# git ssh 私有密钥,不填则使用默认的
- GIT_SSH_PRIVATE_KEY=${GIT_SSH_PRIVATE_KEY}
# 监控配置
- INFLUXDB_HOST=feapder_influxdb
- INFLUXDB_HOST=${INFLUXDB_HOST}
- INFLUXDB_DB=${INFLUXDB_DB}
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
Expand Down Expand Up @@ -95,7 +95,7 @@ services:

influxdb:
restart: always
image: influxdb:1.8.6
image: registry.cn-hangzhou.aliyuncs.com/feapderd/influxdb:1.8.6
container_name: feapder_influxdb
volumes:
- ~/data/feapder/influxdb:/var/lib/influxdb
Expand Down

0 comments on commit ff0cc20

Please sign in to comment.