Browse Source

first commit

master
opac 4 years ago
commit
77fed7d180
  1. 13
      dockerfile
  2. 19
      nginx/nginx.conf
  3. 1
      src

13
dockerfile

@ -0,0 +1,13 @@
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY src/package*.json ./
RUN npm install
COPY src/. .
RUN rm -rf dist/
RUN npm run build
FROM nginx:stable-alpine as production-stage
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

19
nginx/nginx.conf

@ -0,0 +1,19 @@
server {
listen 80;
server_name localhost;
error_page 404 /custom.html;
location /{
root /usr/share/nginx/html;
index index.html index.htm;
include /etc/nginx/mime.types;
}
location /custom.html{
root /usr/share/nginx/html;
index index.html index.htm;
include /etc/nginx/mime.types;
try_files $uri $uri/ /index.html;
}
}

1
src

@ -0,0 +1 @@
Subproject commit ddd52cf09d1d72621addf3539adac756e8476ad7
Loading…
Cancel
Save