Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Merge requests
!7
K8s deploy
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
K8s deploy
k8s-deploy
into
dev
Overview
0
Commits
30
Pipelines
40
Changes
2
Merged
Remi PLANEL
requested to merge
k8s-deploy
into
dev
1 year ago
Overview
0
Commits
30
Pipelines
40
Changes
2
Expand
deploy wiki on defense-finder namespace
Deploy static website serve by nginx
0
0
Merge request reports
Viewing commit
8ce95007
Prev
Next
Show latest version
2 files
+
3
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
8ce95007
WIP: display env base url
· 8ce95007
Remi PLANEL
authored
1 year ago
Dockerfile
+
26
−
4
Options
### Stage Install ###
FROM
node:19.5-bullseye-slim
as
install
RUN
mkdir
/usr/src/app
WORKDIR
/usr/src/app
ENV
PATH /usr/src/app/node_modules/.bin:$PATH
COPY
package*.json ./
@@ -22,13 +23,34 @@ CMD ["npm", "run", "dev"]
### STAGE: Build ###
FROM
node:19.5-bullseye-slim
as
build
WORKDIR
/usr/src/app
COPY
--from=install /usr/src/app ./
COPY
. /usr/src/app
RUN
npm run build
### STAGE: serve ###
FROM
node:19.5-bullseye-slim
as
serve
WORKDIR
/usr/src/app
COPY
--from=build /usr/src/app/.output ./
CMD
[ "node", "server/index.mjs"]
### STAGE: Generate ###
FROM
node:19.5-bullseye-slim
as
generate
ARG
BASE_URL=/
ENV
NUXT_APP_BASE_URL=${BASE_URL}
WORKDIR
/usr/src/app
COPY
--from=install /usr/src/app ./
COPY
. /usr/src/app
RUN
npm run generate
### STAGE: NGINX ###
FROM
nginx:stable-alpine
COPY
--from=build /usr/src/app/dist /usr/share/nginx/html
EXPOSE
80
FROM
nginxinc/nginx-unprivileged:1.25
# RUN rm -rf /usr/share/nginx/html/*
COPY
nginx.conf /etc/nginx/conf.d/default.conf
COPY
--from=generate /usr/src/app/.output/public /etc/nginx/html
CMD
["nginx", "-g", "daemon off;"]
\ No newline at end of file
Loading