Docker compose with Shanoir front on host machine - fli-iam/shanoir-ng GitHub Wiki
Having a front on the host machine is far easier when you developp the front. Here I use 8083 as a but feel free to use any free port you want, except the port used by the front microservice.
KEYCLOAK_BASE_URL: 'http://localhost:8080/auth',
LOGOUT_REDIRECT_URL: 'http://localhost:8083/shanoir-ng/index.html',
...
new OpenBrowserPlugin({ url: 'http://localhost:8083/shanoir-ng' })
...
devServer: {
historyApiFallback: true,
stats: 'minimal',
port: 8083
}
http://localhost:8080/auth/js/keycloak.js
- Must be configured in index.html as a
<script>
tag - In the future, there will probably be an angular cli file where this configuration will be deported
- On Virtual Box, configure port redirection for all the microservices and for your host front :
Nom | Protocol | Host IP | Host port | Guest IP | Guest port |
---|---|---|---|---|---|
http | TCP | 127.0.0.1 | 80 | 80 | |
keycloak MS | TCP | 127.0.0.1 | 8080 | 8080 | |
user MS | TCP | 127.0.0.1 | 9901 | 9901 | |
study MS | TCP | 127.0.0.1 | 9902 | 9902 | |
import MS | TCP | 127.0.0.1 | 9903 | 9903 | |
dataset MS | TCP | 127.0.0.1 | 9904 | 9904 | |
host front | TCP | 127.0.0.1 | 8083 | 8083 |
Note : you must restart your VM to apply this configuration
On each microservice, edit application.yml and modify the propertie : front.server.address: http://localhost:8083/shanoir-ng/
- In Clients, edit shanoir-ng-front
- Set Web Origins to http://localhost:8083