diff --git a/Dockerfile b/Dockerfile index 29fc33d130e715736120a90dcd17da9f30d74606..81d417a6a428d9c678029922507cbcb50fd5cd46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,5 +21,6 @@ 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/ +COPY nginx/htpasswd /etc/nginx/htpasswd EXPOSE 80 diff --git a/nginx/default.conf b/nginx/default.conf index 3683d12f88eba670b9edd54eb3881d024d3ac107..a0355cc63a5f63837ddad1f688c68777c35e4dcb 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -5,6 +5,9 @@ server { index index.html; root /usr/share/nginx/html; + auth_basic "Preview Area"; + auth_basic_user_file /etc/nginx/htpasswd; + location / { try_files $uri$args $uri$args/ /index.html; } diff --git a/nginx/htpasswd b/nginx/htpasswd new file mode 100644 index 0000000000000000000000000000000000000000..a3dd797134c6a41bbb24e3da1406c99d77913abd --- /dev/null +++ b/nginx/htpasswd @@ -0,0 +1 @@ +admin:$apr1$HGc63ar4$hN6OOa9rVeHyT.uJkv3ko.