Skip to content

Commit

Permalink
feat: add docker+nginx configuration to config-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
e2corporation committed Oct 21, 2021
1 parent f06717e commit 561372c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions config-ui/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
19 changes: 8 additions & 11 deletions config-ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM node:14-alpine

COPY package.json /src/package.json
WORKDIR /src
RUN npm i

COPY . /src

CMD ["npm", "run", "dev"]

EXPOSE 4000
FROM nginx:latest
RUN rm /etc/nginx/conf.d/default.conf
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY ./dist/* ./
EXPOSE 80 443
ENTRYPOINT ["nginx", "-g", "daemon off;"]
9 changes: 9 additions & 0 deletions config-ui/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri /index.html;
}
}

0 comments on commit 561372c

Please sign in to comment.