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