diff --git a/Dockerfile b/Dockerfile index cc09ec0..98bf2f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,6 @@ RUN yarn && yarn build FROM nginx:1.19.10 as app COPY --from=build ./app/build /usr/share/nginx/html COPY nginx/default.conf.template /etc/nginx/templates/default.conf.template +COPY nginx/.htpasswd /etc/nginx/.htpasswd ENV SERVER_PORT=80 ENV DGCA_ISSUANCE_SERVICE_URL=http://localhost:8080 diff --git a/docker-compose.yml b/docker-compose.yml index b87fc20..622c7fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: internal: dgc-issuance-service: - image: docker.pkg.github.com/eu-digital-green-certificates/dgca-issuance-service/dgca-issuance-service:0.0.9 + image: docker.pkg.github.com/eu-digital-green-certificates/dgca-issuance-service/dgca-issuance-service:1.0.0 container_name: dgc-issuance-service hostname: dgc-issuance-service ports: diff --git a/nginx/.htpasswd b/nginx/.htpasswd new file mode 100644 index 0000000..a8c8660 --- /dev/null +++ b/nginx/.htpasswd @@ -0,0 +1 @@ +dgca-user:$apr1$p/TIVIAC$UPG8QZSTcVd/iJ6AhzEX5/ diff --git a/nginx/default.conf.template b/nginx/default.conf.template index 0415e16..1464fbf 100644 --- a/nginx/default.conf.template +++ b/nginx/default.conf.template @@ -2,6 +2,8 @@ server { listen ${SERVER_PORT}; server_tokens off; location / { + auth_basic "Secured Site"; + auth_basic_user_file /etc/nginx/.htpasswd; root /usr/share/nginx/html; index unresolvable-file-html.html; try_files $uri @index;