Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#Build
FROM node:lts AS builder

WORKDIR /app

RUN echo 'nodeLinker: node-modules' > .yarnrc.yml

RUN corepack enable

RUN yes | yarn set version 3.1.1

COPY . .

RUN yarn install

RUN yarn build


#Run
FROM nginx:alpine

COPY --from=builder /app/dist /usr/share/nginx/html

COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
11 changes: 11 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
server {
listen 80;
server_name _;

root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri /index.html;
}
}