From d5b5dcc87761303e7af9902f83be0f3c39256ac8 Mon Sep 17 00:00:00 2001 From: Mihailo Cvjetinovic <127780035+mihailocv@users.noreply.github.com> Date: Sun, 28 Jun 2026 19:00:22 +0200 Subject: [PATCH] add nixpack file --- Dockerfile | 13 +++++++++++++ nixpacks.toml | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100644 nixpacks.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6ffecd6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +# Build stage +FROM node:20-alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm ci +COPY . . +RUN node --max-old-space-size=2048 ./node_modules/.bin/ng build --configuration production + +# Serve stage +FROM nginx:alpine +COPY --from=builder /app/dist/test /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/nixpacks.toml b/nixpacks.toml new file mode 100644 index 0000000..9463037 --- /dev/null +++ b/nixpacks.toml @@ -0,0 +1,11 @@ +[phases.setup] +nixPkgs = ["nodejs_20"] + +[phases.install] +cmds = ["npm ci"] + +[phases.build] +cmds = ["node --max-old-space-size=2048 ./node_modules/.bin/ng build --configuration production"] + +[start] +cmd = "npx --yes serve -s dist/test/browser -l 3000" \ No newline at end of file