FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScriptNote/docker/Dockerfile at master · mbrsagor/JavaScriptNote · GitHub
mbrsagor
/
JavaScriptNote
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScriptNote
/
docker
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (17 loc) · 462 Bytes
Breadcrumbs
JavaScriptNote
/
docker
/
Dockerfile
Copy path
File metadata and controls
27 lines (17 loc) · 462 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
Stage 1: Build React app
FROM
node:18 AS build
WORKDIR
/app
COPY
package*.json ./
RUN
npm install
COPY
. .
RUN
npm run build
#
Stage 2: Serve with Nginx
FROM
nginx:alpine
#
Remove default static assets
RUN
rm -rf /usr/share/nginx/html/*
#
Copy built files from previous stage
COPY
--from=build /app/dist /usr/share/nginx/html
#
Optional: Custom Nginx config
COPY
nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE
80
CMD
[
"nginx"
,
"-g"
,
"daemon off;"
]
Back
|
FazBrowse Home
|
New Git URL