-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from secvisogram/fix/hostdockerinternal
Fix/hostdockerinternal
- Loading branch information
Showing
7 changed files
with
231 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
worker_processes 1; | ||
|
||
events { worker_connections 1024; } | ||
|
||
http { | ||
sendfile on; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
|
||
|
||
#https://www.getpagespeed.com/server-setup/nginx/tuning-proxy_buffer_size-in-nginx | ||
proxy_buffer_size 16k; # should be enough for most PHP websites, or adjust as above | ||
proxy_busy_buffers_size 24k; # essentially, proxy_buffer_size + 2 small buffers of 4k | ||
proxy_buffers 64 4k; # should be enough for most PHP websites, adjust as above to get an accurate value | ||
|
||
server { | ||
listen 80; | ||
|
||
location /realms { | ||
proxy_pass http://keycloak.csaf.internal:8080/realms; | ||
proxy_redirect off; | ||
} | ||
|
||
location /resources{ | ||
proxy_pass http://keycloak.csaf.internal:8080/resources; | ||
proxy_redirect off; | ||
} | ||
|
||
location /validate/api/v1/tests { | ||
proxy_pass http://validator.csaf.internal:8082/api/v1/tests; | ||
proxy_redirect off; | ||
} | ||
|
||
location /validate/api/v1/validate { | ||
proxy_pass http://validator.csaf.internal:8082/api/v1/validate; | ||
proxy_redirect off; | ||
} | ||
|
||
location /api/ { | ||
proxy_pass http://oauth2.csaf.internal:4180; | ||
proxy_redirect off; | ||
} | ||
|
||
location /oauth2 { | ||
proxy_pass http://oauth2.csaf.internal:4180/oauth2; | ||
proxy_redirect off; | ||
} | ||
|
||
location /.well-known/appspecific/de.bsi.secvisogram.json { | ||
proxy_pass http://secvisogram.csaf.internal/.well-known/appspecific/de.bsi.secvisogram.json; | ||
proxy_redirect off; | ||
} | ||
|
||
location / { | ||
proxy_pass http://secvisogram.csaf.internal/; | ||
proxy_redirect off; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Build Stage 1 | ||
# This build created a staging docker image | ||
# | ||
FROM node:20-alpine AS build | ||
WORKDIR /usr/src | ||
RUN apk add git; \ | ||
git clone https://github.com/secvisogram/secvisogram.git; \ | ||
cd secvisogram; \ | ||
npm ci; \ | ||
npm run build | ||
|
||
# Build Stage 2 | ||
# This build takes the production build from staging build | ||
# | ||
|
||
FROM nginx:1.23-alpine | ||
COPY --from=build /usr/src/secvisogram/app/dist /usr/share/nginx/html | ||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"loginAvailable": true, | ||
"loginUrl": "/oauth2/sign_in?rd=http%3A%2F%2Flocalhost", | ||
"logoutUrl": "/oauth2/sign_out?rd=http://localhost/realms/csaf/protocol/openid-connect/logout?post_logout_redirect_uri=http%3A%2F%2Flocalhost&client_id=secvisogram", | ||
"userInfoUrl": "/oauth2/userinfo", | ||
"validatorUrl": "/validate" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters