What is the syntax for runtime variable ApplicationRootUrl?

1
I am trying to put a dockerized mendix application created by  https://github.com/mendix/docker-mendix-buildpack behind a reverse proxy. The problem is that the application is available on folowing URL https:<ip-address-of-server>/mendixApp/ ane every time I open it it will redirect me to a login screen. unfortunately instead of redirecting to me https:<ip-address-of-server>/mendixApp/login, it redirects me to https:<ip-address-of-server>/login.    I need to somehow let the app know that there is a custom url path. I believie this can be done by ApplicationRootUrl variable described here. https://docs.mendix.com/refguide/custom-settings#general It should work if I would provide it to the mendix runtime as enviroment variable. The questions is: Is that the right approach? If so, how can I set the variable so that it works for every IP address?
asked
2 answers
1

Your approach might work. However, currently Mendix does not officially support apps running at URLs beyond the root level. Instead the standard recommendation is to use different subdomains for each app. So instead of:

 

https://mydomain.com/app1

https://mydomain.com/app2

you should use:

https://app1.mydomain.com

https://app2.mydomain.com 

 

If that’s definitely not an option, you can still make most things work. One exception I know of is the built-in page URL feature.

Runtime settings in the docker buildpack are used by setting an environment variable with a prefix, so:

MXRUNTIME_ApplicationRootUrl

and the value should be the actual URL of the application.

answered
1

Thanks Eric for the response :)

I tried to deploy my mendix application and provide the “MXRUNTIME_ApplicationRootUrl” as an enviroment variable. (see docker-compose bellow) Unfortunately, it didn’t help. 

I have some other ideas how to solve it but I am not very optimistic.

version: '2.4'
services:
  myapp:
    environment:
      ADMIN_PASSWORD: Password
      DATABASE_ENDPOINT: 'jdbc:hsqldb:file:~/data/database/db:mem:mendix'
      MXRUNTIME_DatabaseType: HSQLDB
      MXRUNTIME_DatabaseJdbcUrl: 'jdbc:hsqldb:file:~/data/database/db:mem:mendix'
      MXRUNTIME_ApplicationRootUrl: 'https://192.168.239.129/myapp'
    image: 'mendixblank/mendixnews:blank'
    mem_limit: 1gb
    restart: unless-stopped
    ports:
      - '8080'

 

answered