front Docker Compose ready
This commit is contained in:
36
front/.dockerignore
Normal file
36
front/.dockerignore
Normal 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
1
front/.nvmrc
Normal file
@@ -0,0 +1 @@
|
||||
v24.7.0
|
||||
55
front/Dockerfile
Normal file
55
front/Dockerfile
Normal 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"]
|
||||
2491
front/bun.lock
2491
front/bun.lock
File diff suppressed because it is too large
Load Diff
5
front/compose.yml
Normal file
5
front/compose.yml
Normal 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
16545
front/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user