diff --git a/.env b/.env index d637557..68bec5b 100644 --- a/.env +++ b/.env @@ -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 diff --git a/docker-compose.yaml b/docker-compose.yaml index 3937001..6d9e582 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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] @@ -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} @@ -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