Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sevenpro-frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FAP
sevenpro-frontend
Commits
dc089dce
Commit
dc089dce
authored
Apr 09, 2025
by
devteam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
03686ee2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
Dockerfile
Dockerfile
+57
-0
No files found.
Dockerfile
0 → 100644
View file @
dc089dce
# syntax=docker.io/docker/dockerfile:1
FROM
node:22-alpine AS base
# INSTALAÇÃO DE DEPENDENCIAS
FROM
base AS deps
RUN
apk add
--no-cache
libc6-compat
WORKDIR
/app
COPY
package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
RUN
\
if
[
-f
yarn.lock
]
;
then
yarn
--frozen-lockfile
;
\
elif
[
-f
package-lock.json
]
;
then
npm ci
;
\
elif
[
-f
pnpm-lock.yaml
]
;
then
corepack
enable
pnpm
&&
pnpm i
--frozen-lockfile
;
\
else
echo
"Lockfile not found."
&&
exit
1
;
\
fi
# REBUILD CODIGO APENAS QUANDO PRECISA
FROM
base AS builder
WORKDIR
/app
COPY
--from=deps /app/node_modules ./node_modules
COPY
. .
ENV
NEXT_TELEMETRY_DISABLED=1
RUN
\
if
[
-f
yarn.lock
]
;
then
yarn run build
;
\
elif
[
-f
package-lock.json
]
;
then
npm run build
;
\
elif
[
-f
pnpm-lock.yaml
]
;
then
corepack
enable
pnpm
&&
pnpm run build
;
\
else
echo
"Lockfile not found."
&&
exit
1
;
\
fi
# IMAGEM PARA PRODUCAO, COPIA TODOS OS ARQUIVOS DO REBUILD E EXECUTA
FROM
base AS runner
WORKDIR
/app
ENV
NODE_ENV=production
ENV
NEXT_TELEMETRY_DISABLED=1
RUN
addgroup
--system
--gid
1001 nodejs
RUN
adduser
--system
--uid
1001 nextjs
COPY
--from=builder /app/public ./public
COPY
--from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY
--from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
#USER nextjs
EXPOSE
3000
ENV
PORT=3000
ENV
HOSTNAME="0.0.0.0"
CMD
["node", "server.js"]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment