mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
chore: add traefik
This commit is contained in:
@ -1,6 +1,5 @@
|
|||||||
FROM node:lts-alpine AS base
|
FROM node:lts-alpine AS base
|
||||||
|
|
||||||
# Install dependencies only when needed
|
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||||
|
23
compose.yaml
Normal file
23
compose.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
services:
|
||||||
|
reverse-proxy:
|
||||||
|
image: traefik
|
||||||
|
command:
|
||||||
|
- --api.insecure=true
|
||||||
|
- --providers.docker
|
||||||
|
- --entrypoints.app.address=:80
|
||||||
|
ports:
|
||||||
|
- '8021:80'
|
||||||
|
# The Web UI (enabled by --api.insecure=true)
|
||||||
|
- '8022:8080'
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
labels:
|
||||||
|
- 'traefik.http.routers.app.rule=PathPrefix(`/`)'
|
||||||
|
- 'traefik.http.services.app.loadbalancer.server.port=3000'
|
||||||
|
deploy:
|
||||||
|
replicas: 3
|
||||||
|
ports:
|
||||||
|
- 3000
|
Reference in New Issue
Block a user