Skip to content

Commit

Permalink
feat: basic auth protection for web frontend (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurosens authored May 21, 2021
1 parent 3fa2ddf commit 68f0c80
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions nginx/.htpasswd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dgca-user:$apr1$p/TIVIAC$UPG8QZSTcVd/iJ6AhzEX5/

This comment has been minimized.

Copy link
@sp8c3

sp8c3 Oct 28, 2021

👀

2 changes: 2 additions & 0 deletions nginx/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 68f0c80

Please sign in to comment.