Added dockerfile + compose

This commit is contained in:
Nicolai Ort 2023-04-19 10:22:46 +02:00
parent 50764bca47
commit e5535f1869
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
2 changed files with 21 additions and 0 deletions

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM registry.odit.services/hub/library/node:19.9.0-alpine3.16 AS build
ARG NPM_REGISTRY_URL=registry.npmjs.org
WORKDIR /app
COPY package.json *.config.cjs *.config.js *.config.ts tsconfig.json .npmrc ./
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
RUN pnpm i
COPY src ./src
COPY static ./static
RUN pnpm build
# final image
FROM registry.odit.services/library/nginx-brotli:3.15 as final
COPY --from=build /app/build /usr/share/nginx/html

6
docker-compose.yml Normal file
View File

@ -0,0 +1,6 @@
version: "3"
services:
httpd:
build: .
ports:
- 8181:80