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.

webpack.dev.js

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
}

url of keycloak.js

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

Virtual Box, (Windows ?)

  • 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

application.yml

On each microservice, edit application.yml and modify the propertie : front.server.address: http://localhost:8083/shanoir-ng/

Keycloak

⚠️ **GitHub.com Fallback** ⚠️