Comments (2)
it now only works with "docker compose up" demo.
from azure-spring-cloud-playground.
Possible solutions:
- Use system properties in the generated cloud gateway index page to dynamically generate urls.
- add environment variable to the dockerfile and docker-compose
- use Spring thymeleaf template to write index page
- ref to the system properties in the front index page with
${@environment.getProperty('GATEWAY_URL')}
- Add Spring thymeleaf to the dependency and thymeleaf configuration in the template
- add environment variable to the start script and readme etc about how to configure and run the downloaded Spring Cloud project
- Rewrite the gateway home page links with javascript.
- gateway index page Spring Cloud modules href with port and subpath only,
e.g.,<a href=":8888/abc">ABC</href>
- when page is firstly loaded, rewrite the
href
by adding the protocol and hostname to the href, e.g.,
<html>
<head>
<script>
function setHref() {
document.getElementById('modify-me').href = window.location.protocol + "//" + window.location.hostname + ":8080/other/";
}
</script>
</head>
<body onload="setHref()">
<a href="/other/" id="modify-me">Look at another port</a>
</body>
</html>
to e.g.,:
<a href="https://my.deployed.host:8888/abc">ABC</href>
Pros and Cons:
-
Solution 1 is a little complex, many configurations and instructions for the user
-
Solution 2 is easy to implement, but it relies on each Spring Cloud Microservices are deployed to the same host with different ports(azure web app only exposes 443 and 80 port, which makes it impossible to deploy to multiple ports), or at least the deployed hostnames share predefined rules, e.g., share same prefix or suffix.
e.g., home page with ABC.com
eureka page with ABC.eureka.com
hystrix page with ABC.hystrix.com
from azure-spring-cloud-playground.
Related Issues (20)
- add a sign-in in home page of playground HOT 1
- add the rest of azure starters to the home page HOT 2
- port conflict? HOT 1
- deploy it to azure web app for demo
- Register a multi-tenant app to allow anyone to sign in
- gateway dependencies should be generated based on users selections
- set up CICD HOT 1
- document technical bits
- Add k8s deployment file to support deploying to AKS
- telemetry HOT 1
- Keep build time based docker image in ACR.
- Show logged in user and logout from dropdown
- cloud-hystrix-dashboard compilation failure HOT 1
- cloud-hystrix-dashboard compilation error HOT 1
- Login error HOT 2
- The account needs to be added as an external user in the tenant first
- support user defined module HOT 1
- create a seperate /kubernetes folder parallel to /docker and put all helm charts there HOT 1
- [Patent Idea] microservice dependencies graph autogeneration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-spring-cloud-playground.