Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
Web-CoreX
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
Hendrik Garske
Web-CoreX
Commits
964b7848
Commit
964b7848
authored
Dec 27, 2025
by
Hendrik Garske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Captain Definition und Dockerfile für Deployment hinzugefügt
parent
ce00a27f
Pipeline
#17
passed with stages
in 1 minute and 56 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
Dockerfile
Dockerfile
+50
-0
captain-definition
captain-definition
+5
-0
No files found.
Dockerfile
0 → 100644
View file @
964b7848
FROM
node:20-alpine AS base
# Install dependencies only when needed
FROM
base AS deps
RUN
apk add
--no-cache
libc6-compat openssl
WORKDIR
/app
# Copy package files
COPY
package.json package-lock.json* ./
RUN
npm ci
# Rebuild the source code only when needed
FROM
base AS builder
WORKDIR
/app
COPY
--from=deps /app/node_modules ./node_modules
COPY
. .
# Generate Prisma Client
ENV
NEXT_TELEMETRY_DISABLED 1
RUN
npx prisma generate
# Build Next.js
RUN
npm run build
# Production image, copy all the files and run next
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 necessary files from builder
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
COPY
--from=builder /app/node_modules/.prisma ./node_modules/.prisma
COPY
--from=builder /app/node_modules/@prisma ./node_modules/@prisma
USER
nextjs
EXPOSE
3000
ENV
PORT 3000
ENV
HOSTNAME "0.0.0.0"
CMD
["node", "server.js"]
captain-definition
0 → 100644
View file @
964b7848
{
"schemaVersion": 2,
"dockerfilePath": "./Dockerfile"
}
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