OcDash Deploy commited on
Commit
2777a2e
·
1 Parent(s): 052eea3

update: fresh build

Browse files
Files changed (2) hide show
  1. Dockerfile +10 -7
  2. nginx.conf +1 -1
Dockerfile CHANGED
@@ -1,9 +1,12 @@
 
 
 
 
 
 
 
1
  FROM nginx:alpine
2
- COPY . /usr/share/nginx/html
3
  COPY nginx.conf /etc/nginx/conf.d/default.conf
4
- COPY start.sh /start.sh
5
- RUN rm -f /usr/share/nginx/html/Dockerfile /usr/share/nginx/html/nginx.conf /usr/share/nginx/html/README.md /usr/share/nginx/html/start.sh /usr/share/nginx/html/.gitignore 2>/dev/null; \
6
- rm -rf /usr/share/nginx/html/.git 2>/dev/null; \
7
- chmod +x /start.sh
8
- EXPOSE 8080
9
- CMD ["/start.sh"]
 
1
+ FROM node:20-alpine AS base
2
+ WORKDIR /app
3
+ COPY package.json ./
4
+ RUN npm install
5
+ COPY . .
6
+ RUN npm run build
7
+
8
  FROM nginx:alpine
9
+ COPY --from=base /app/dist /usr/share/nginx/html
10
  COPY nginx.conf /etc/nginx/conf.d/default.conf
11
+ EXPOSE 80
12
+ CMD ["nginx", "-g", "daemon off;"]
 
 
 
 
nginx.conf CHANGED
@@ -1,5 +1,5 @@
1
  server {
2
- listen 8080;
3
  root /usr/share/nginx/html;
4
  index index.html;
5
  location / {
 
1
  server {
2
+ listen 80;
3
  root /usr/share/nginx/html;
4
  index index.html;
5
  location / {