Files
stock-scanner/docker-compose.yml
2025-03-07 16:03:39 +08:00

52 lines
1.1 KiB
YAML

version: '3.8'
services:
backend:
build:
context: .
dockerfile: Dockerfile
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
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:
build:
context: ./frontend
dockerfile: Dockerfile
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