diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..29fc33d130e715736120a90dcd17da9f30d74606 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM nginx + +RUN apt-get update +RUN apt-get install -y curl + +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash + +RUN apt-get install -y nodejs + +COPY package.json /app/ +COPY package-lock.json /app/ + +WORKDIR /app/ + +RUN npm install + +COPY . /app/ + +RUN npm run build -- --prod --base-href=/covid19/ + +RUN cp -r dist/covid19/* /usr/share/nginx/html/ + +COPY nginx/default.conf /etc/nginx/conf.d/ + +EXPOSE 80 diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000000000000000000000000000000000000..3683d12f88eba670b9edd54eb3881d024d3ac107 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,11 @@ +server { + listen 80; + server_name localhost; + + index index.html; + root /usr/share/nginx/html; + + location / { + try_files $uri$args $uri$args/ /index.html; + } +}