From 8024c4b2d5b274c4ef790ae99ab701c498df5c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20=C3=85sberg?= Date: Mon, 30 May 2022 17:23:00 +0000 Subject: [PATCH 1/2] Dockerized! --- Dockerfile | 14 ++++++++++++++ docker-compose.yml | 7 +++++++ example/index.html | 1 + 3 files changed, 22 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..99cd0a5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build + +RUN curl -fsSL https://deb.nodesource.com/setup_16.x | sh - +RUN apt-get update && apt-get install -y nodejs + +WORKDIR /app +COPY . ./ +RUN npm ci +WORKDIR /app/example +RUN npm ci +RUN npx webpack-cli --mode production + +FROM nginx:1.22.0 +COPY --from=build /app/example/dist /usr/share/nginx/html diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..54ab560 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3" + +services: + server: + build: . + ports: + - 80:80 diff --git a/example/index.html b/example/index.html index 3034560..73ac846 100644 --- a/example/index.html +++ b/example/index.html @@ -4,6 +4,7 @@ Browser C# Example +