Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vue
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ronick Romulus
vue
Commits
81c9e3ee
Commit
81c9e3ee
authored
1 year ago
by
ronick
Browse files
Options
Downloads
Patches
Plain Diff
init
parent
229fc278
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+9
-15
9 additions, 15 deletions
Dockerfile
deployment.yaml
+1
-1
1 addition, 1 deletion
deployment.yaml
package.json
+1
-0
1 addition, 0 deletions
package.json
with
11 additions
and
16 deletions
Dockerfile
+
9
−
15
View file @
81c9e3ee
# Use an official
Vu
e.js runtime
image
as the base image
# Use an official
Nod
e.js runtime as the base image
FROM
node:14
-slim
as
build
FROM
node:14
# Set the working directory in the container
# Set the working directory in the container
WORKDIR
/app
WORKDIR
/app
# Copy package.json and package-lock.json
to the working directory
# Copy
the
package.json and package-lock.json
(or yarn.lock) files to the container
COPY
package*.json ./
COPY
package*.json ./
# Install
project
dependencies
# Install
app
dependencies
RUN
npm
install
RUN
npm
install
# Copy the rest of the application code to the container
# Copy the rest of the application code to the container
COPY
src/components
.
COPY
.
.
# Build the Vue.js app
lica
tion
# Build the Vue.js app
for produc
tion
RUN
npm run build
RUN
npm run build
# Use a lightweight Nginx image to serve the built Vue.js app
# Expose the port the app will run on (change this if necessary)
FROM
nginx:1.21-alpine
# Copy the built app from the previous stage into the Nginx image
COPY
--from=build /app/dist /usr/share/nginx/html
# Expose port for incoming HTTP traffic
EXPOSE
8081
EXPOSE
8081
# S
tart Nginx when the container starts
# S
et the startup command to serve the built app
CMD
["n
ginx
", "
-g
", "
daemon off;
"]
CMD
["n
pm
", "
run
", "
serve
"]
This diff is collapsed.
Click to expand it.
deployment.yaml
+
1
−
1
View file @
81c9e3ee
...
@@ -14,7 +14,7 @@ spec:
...
@@ -14,7 +14,7 @@ spec:
spec
:
spec
:
containers
:
containers
:
-
name
:
frontend
-
name
:
frontend
image
:
https://gitlab.univ-lille.fr/ronick.romulus.etu/vue/frontend-imag
e:latest
image
:
roromulus/vu
e:latest
ports
:
ports
:
-
containerPort
:
8081
# Port your Vue.js app is running on
-
containerPort
:
8081
# Port your Vue.js app is running on
env
:
env
:
...
...
This diff is collapsed.
Click to expand it.
package.json
+
1
−
0
View file @
81c9e3ee
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
"version"
:
"0.0.0"
,
"version"
:
"0.0.0"
,
"private"
:
true
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
"serve"
:
"vite"
,
"dev"
:
"vite"
,
"dev"
:
"vite"
,
"build"
:
"vite build"
,
"build"
:
"vite build"
,
"preview"
:
"vite preview"
"preview"
:
"vite preview"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment