mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
Switch to working docker-compose for deployments
This commit is contained in:
parent
f8fa412de9
commit
82543fc2f7
@ -1,29 +1,15 @@
|
|||||||
services:
|
version: '3.8'
|
||||||
internal-proxy:
|
|
||||||
image: traefik:latest
|
|
||||||
command:
|
|
||||||
- --entrypoints.webinternal.address=:80
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:36694:80"
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
newsanalyze-service:
|
|
||||||
build: .
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
|
||||||
interval: 1m
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.routers.newsanalyze.rule=Host(`news.yuanhau.com`)"
|
|
||||||
- "traefik.http.routers.newsanalyze.entrypoints=webinternal"
|
|
||||||
- "traefik.http.services.newsanalyze.loadbalancer.server.port=3000"
|
|
||||||
|
|
||||||
networks:
|
services:
|
||||||
app-network:
|
newsanalyze-service:
|
||||||
driver: bridge
|
build: .
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:36694:3000"
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
29
new-docker-compose.yml
Executable file
29
new-docker-compose.yml
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
services:
|
||||||
|
internal-proxy:
|
||||||
|
image: traefik:latest
|
||||||
|
command:
|
||||||
|
- --entrypoints.webinternal.address=:80
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:36694:80"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
newsanalyze-service:
|
||||||
|
build: .
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||||
|
interval: 1m
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.newsanalyze.rule=Host(`news.yuanhau.com`)"
|
||||||
|
- "traefik.http.routers.newsanalyze.entrypoints=webinternal"
|
||||||
|
- "traefik.http.services.newsanalyze.loadbalancer.server.port=3000"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
app-network:
|
||||||
|
driver: bridge
|
Loading…
x
Reference in New Issue
Block a user