ci: 构建单镜像版本

1. 优化路由改为createWebHashHistory
2. 优化Dockerfile
This commit is contained in:
CaasianVale
2025-03-08 03:59:25 +08:00
parent 2dd8b7ded8
commit ce331a4d0d
9 changed files with 54 additions and 250 deletions

View File

@@ -1,48 +0,0 @@
version: '3.8'
services:
backend:
image: ${DOCKERHUB_USERNAME}/stock-scanner-backend:${TAG:-latest}
container_name: stock-scanner-backend
ports:
- "8888:8888"
environment:
- API_KEY=${API_KEY}
- API_URL=${API_URL}
- API_MODEL=${API_MODEL}
- API_TIMEOUT=${API_TIMEOUT}
- LOGIN_PASSWORD=${LOGIN_PASSWORD}
- ANNOUNCEMENT_TEXT=${ANNOUNCEMENT_TEXT}
volumes:
- ./logs:/app/logs
- ./.env:/app/.env
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8888/config"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
networks:
- stock-scanner-network
frontend:
image: ${DOCKERHUB_USERNAME}/stock-scanner-frontend:${TAG:-latest}
container_name: stock-scanner-frontend
ports:
- "80:80"
depends_on:
- backend
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
networks:
- stock-scanner-network
networks:
stock-scanner-network:
driver: bridge