代码拉取完成,页面将自动刷新
version: "3.5"
x-logging: &default-logging
options:
max-size: "100m"
max-file: "1"
driver: json-file
services:
feapder_front:
container_name: feapder_front
image: ${FRONT_IMAGE}
restart: always
environment:
- BACKEND_URL=http://feapder_backend:${BACKEND_PORT}
- FRONT_PORT=${FRONT_PORT}
ports:
- ${FRONT_PORT}:${FRONT_PORT} # 前端端口 (自定义端口:80)
depends_on:
- feapder_backend
logging: *default-logging
feapder_backend:
container_name: feapder_backend
image: ${BACKEND_IMAGE}
restart: always
command: /wait-for-it.sh mysql:3306 -t 60 --strict -- uvicorn main:app --host 0.0.0.0 --workers ${BACKEND_WORKER} --port ${BACKEND_PORT} # workers 为后端服务的个数,爬虫多可改大点
ports:
- ${BACKEND_PORT}:${BACKEND_PORT} # 后端端口 (自定义端口:8000)
environment:
- 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]
- 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=["--network feaplat", "--log-opt max-size=20m", "--log-opt max-file=1"]
# git ssh 私有密钥,不填则使用默认的
- GIT_SSH_PRIVATE_KEY=${GIT_SSH_PRIVATE_KEY}
# 监控配置
- INFLUXDB_HOST=${INFLUXDB_HOST}
- INFLUXDB_DB=${INFLUXDB_DB}
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
- INFLUXDB_PORT_TCP=8086
- INFLUXDB_PORT_UDP=8089
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "~/data/feapder/projects:/projects" # 上传的项目挂载, 本地目录:容器路径
depends_on:
- mysql
- redis
- influxdb
logging: *default-logging
feapder:
container_name: feapder_worker
image: ${SPIDER_IMAGE}
mysql:
container_name: feapder_backend_mysql
command: mysqld --character-set-server=utf8mb4
restart: always
image: registry.cn-hangzhou.aliyuncs.com/feapderd/mysql:5.7.29
ports:
- ${MYSQL_PORT}:3306
environment:
- "MYSQL_USER=root"
- "MYSQL_ROOT_PASSWORD=root123"
- "MYSQL_DATABASE=feapder_platform"
- "MYSQL_PASSWORD=root123"
volumes:
- "~/data/feapder/feapder_backend_mysql:/var/lib/mysql" # mysql 挂载, 本地目录:容器路径
logging: *default-logging
redis:
container_name: feapder_backend_redis
command: redis-server --appendonly yes --requirepass feapderYYDS
restart: always
image: registry.cn-hangzhou.aliyuncs.com/feapderd/redis:6.0.10
# ports:
# - ${REDIS_PORT}:6379
volumes:
- "~/data/feapder/feapder_backend_redis:/data" # redis 挂载, 本地目录:容器路径
logging: *default-logging
# # 监控
# grafana:
# user: root
# restart: always
# image: grafana/grafana
# container_name: feapder_grafana
# volumes:
# - ~/data/feapder/grafana:/var/lib/grafana
# environment:
# - GF_SECURITY_ADMIN_USER=admin
# - GF_SECURITY_ADMIN_PASSWORD=admin
# ports:
# - ${GRAFANA_PORT}:3000
# depends_on:
# - influxdb
influxdb:
restart: always
image: registry.cn-hangzhou.aliyuncs.com/feapderd/influxdb:1.8.6
container_name: feapder_influxdb
volumes:
- ~/data/feapder/influxdb:/var/lib/influxdb
- ./conf/influxdb.conf:/etc/influxdb/influxdb.conf
environment:
- INFLUXDB_DB=${INFLUXDB_DB}
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
- INFLUXDB_USER=influx
- INFLUXDB_USER_PASSWORD=influx
ports:
- ${INFLUXDB_PORT_TCP}:8086
- ${INFLUXDB_PORT_UDP}:8089/udp
logging: *default-logging
networks:
default:
name: feaplat
driver: overlay
attachable: true
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。