Skip to content

Commit

Permalink
add dockerfile & nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamedhnia committed Jun 2, 2023
1 parent 1955607 commit fc7a27c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dockerfile
@@ -0,0 +1,12 @@
FROM node:alpine as build
WORKDIR /usr/local/app
COPY ./ /usr/local/app/
RUN npm install --force

RUN npm run build

FROM nginx:latest
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/local/app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
11 changes: 11 additions & 0 deletions nginx.conf
@@ -0,0 +1,11 @@
server {
listen 80;
listen [::]:80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}

0 comments on commit fc7a27c

Please sign in to comment.