dockerize

This commit is contained in:
Dominik Strangas 2023-08-11 00:07:33 +02:00
parent 712212c420
commit b7c4a9375e
2 changed files with 34 additions and 0 deletions

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM node:lts AS runtime
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
ENV HOST=0.0.0.0
ENV PORT=80
EXPOSE 80
CMD node ./dist/server/entry.mjs

22
docker-compose.yml Normal file
View File

@ -0,0 +1,22 @@
version: 3.8
services:
kurwafolio:
build: .
labels:
- "traefik.enable=true"
#- "traefik.http.routers.kurwafolio.entrypoints=websecure"
- "traefik.http.routers.kurwafolio.rule=(Host(`kurwafolio.oceanwave018.de`))"
- "traefik.http.routers.kurwafolio.tls=true"
- "traefik.http.routers.kurwafolio.tls.certresolver=lets-encrypt"
- "traefik.http.routers.kurwafolio.service=kurwafolio"
- "traefik.http.services.kurwafolio.loadbalancer.server.port=80"
- "traefik.http.routers.kurwafolio.middlewares=simpleAuth@file"
- traefik.port=80
- "traefik.docker.network=web"
networks:
- web
networks:
web:
external: true