adds Dockerfiles

This commit is contained in:
Christian Beutel
2024-03-01 22:40:14 +01:00
parent 5e19a4e8bb
commit 33c3b273ab
18 changed files with 318 additions and 93 deletions

21
web/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
RUN npm prune --production
FROM node:18-alpine
WORKDIR /app
COPY --from=build /app/build build/
COPY --from=build /app/node_modules node_modules/
COPY package.json .
EXPOSE 3000
ENV NODE_ENV=production
ENV PUBLIC_POCKETBASE_URL=http://127.0.0.1:8090
ENV PUBLIC_MEILISEARCH_URL=http://127.0.0.1:7700
ENV PUBLIC_MEILISEARCH_API_TOKEN=
CMD [ "node", "build" ]