This commit is contained in:
parent
05425ba9bf
commit
77313e837f
|
|
@ -2,15 +2,16 @@ version: '3.9'
|
|||
|
||||
services:
|
||||
# ---------- Redis Celery Broker ----------
|
||||
redis:
|
||||
image: redis:7
|
||||
container_name: redis
|
||||
selenium-redis-service:
|
||||
image: redis:7.0.5
|
||||
container_name: selenium-redis-container
|
||||
ports:
|
||||
- "6380:6379"
|
||||
|
||||
# ---------- 爬虫服务 ----------
|
||||
selenium:
|
||||
selenium-crawl-service:
|
||||
build: ./selenium
|
||||
image: selenium-crawl-image:1.0
|
||||
container_name: selenium-crawl-container
|
||||
ports:
|
||||
- "5001:5000"
|
||||
|
|
@ -19,13 +20,14 @@ services:
|
|||
API_BASE_URL: "https://open.bigmodel.cn/api/paas/v4"
|
||||
API_KEY: "ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"
|
||||
# ---------- Django + Celery ----------
|
||||
selenium_django:
|
||||
selenium-django-service:
|
||||
build: ./selenium_django
|
||||
image: selenium-django-image:1.0
|
||||
container_name: selenium-django-container
|
||||
environment:
|
||||
PYTHONUNBUFFERED: 1
|
||||
CELERY_BROKER_URL: redis://redis:6379/0
|
||||
CELERY_RESULT_BACKEND: redis://redis:6379/0
|
||||
CELERY_BROKER_URL: redis://selenium-redis-container:6379/0
|
||||
CELERY_RESULT_BACKEND: redis://selenium-redis-container:6379/0
|
||||
# Django 调用爬虫服务的地址
|
||||
CRAWL_API_URL: http://47.83.141.164:5001
|
||||
# API 配置
|
||||
|
|
@ -35,26 +37,27 @@ services:
|
|||
volumes:
|
||||
- "./selenium_django:/app"
|
||||
depends_on:
|
||||
- redis
|
||||
- selenium
|
||||
- selenium-redis-service
|
||||
- selenium-crawl-service
|
||||
ports:
|
||||
- "8002:8000"
|
||||
|
||||
# ---------- 前端 Vue ----------
|
||||
selenium_vue:
|
||||
selenium-vue-service:
|
||||
build:
|
||||
context: ./selenium_vue # 上一级目录
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VITE_API_BASE_URL: http://47.83.141.164:8002 # 改为远程 IP
|
||||
VITE_CRAWL_URL: http://47.83.141.164:5001 # 改为远程 IP
|
||||
image: selenium-vue-image:1.0
|
||||
container_name: selenium-vue-container
|
||||
environment:
|
||||
PORT: 80
|
||||
NGINX_SERVER_NAME: localhost
|
||||
depends_on:
|
||||
- selenium
|
||||
- selenium_django
|
||||
- selenium-crawl-service
|
||||
- selenium-django-service
|
||||
ports:
|
||||
- "8091:80"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue