This commit is contained in:
Oscar
2026-06-04 14:43:57 +03:00
parent 1c69ff56bb
commit 42e675328f
4 changed files with 59 additions and 0 deletions

7
frontend/.dockerignore Normal file
View File

@@ -0,0 +1,7 @@
node_modules/
.nuxt/
.output/
.env
.env.*
!.env.example
*.log

21
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM node:lts-alpine AS builder
WORKDIR /app
RUN npm install -g pnpm
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
ARG API_BASE=http://localhost:1337
ENV API_BASE=$API_BASE
RUN pnpm exec nuxt generate
FROM nginx:stable-alpine
COPY --from=builder /app/.output/public /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]