mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
35 lines
838 B
YAML
Executable File
35 lines
838 B
YAML
Executable File
services:
|
|
reverse-proxy:
|
|
image: traefik:v3.1
|
|
command:
|
|
- "--providers.docker"
|
|
- "--providers.docker.exposedbydefault=false"
|
|
- "--entrypoints.web.address=:80"
|
|
ports:
|
|
- 127.0.0.1:36694:80
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
networks:
|
|
- web
|
|
|
|
newsanalyze-service:
|
|
image: ghcr.io/hpware/news-analyze:master
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
networks:
|
|
- web
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.newsanalyze.rule=Host(`news.yuanhau.com`)"
|
|
- "traefik.http.services.newsanalyze.loadbalancer.server.port=3000"
|
|
restart: unless-stopped
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 2
|
|
|
|
networks:
|
|
web:
|