front Docker Compose ready

This commit is contained in:
2025-08-29 17:57:57 +04:00
parent 96f30f7774
commit 8da47765fe
6 changed files with 16642 additions and 2491 deletions

36
front/.dockerignore Normal file
View File

@@ -0,0 +1,36 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/go/build-context-dockerignore/
**/.classpath
**/.dockerignore
**/.env
**/.env.*
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.next
**/.cache
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose.yml
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
**/build
**/dist
LICENSE
README.md
.nuxt

1
front/.nvmrc Normal file
View File

@@ -0,0 +1 @@
v24.7.0

55
front/Dockerfile Normal file
View File

@@ -0,0 +1,55 @@
####################################################
################### BASE IMAGE #####################
####################################################
FROM node:24.7.0-alpine AS base
WORKDIR /app
####################################################
############### INSTALL DEPENDENCIES ###############
####################################################
FROM base AS deps
COPY package*.json ./
RUN npm ci --omit=dev --prefer-offline --no-audit
####################################################
#################### BUILD APP #####################
####################################################
FROM base AS builder
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
####################################################
###################### FINAL #######################
####################################################
FROM base AS runner
# COPY --from=deps /app/node_modules ./node_modules
COPY --from=builder /app/.output ./.output
COPY package*.json ./
RUN addgroup -g 1001 -S nodejs && \
adduser -S nuxtuser -u 1001 && \
chown -R nuxtuser:nodejs /app
USER nuxtuser
EXPOSE 3000
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=3000
CMD ["node", ".output/server/index.mjs"]

File diff suppressed because it is too large Load Diff

5
front/compose.yml Normal file
View File

@@ -0,0 +1,5 @@
services:
front:
build: .
ports: [ 127.0.0.1:3000:3000 ]
restart: unless-stopped

16545
front/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff