Docker Install - metasfresh behind caddy server (reverse proxy)

According to instructions here about changing ports, I have modified ports as following,

webui:
  build: webui
  links:
    - webapi:webapi
  ports:
    - "8080:80"
    - "8443:443"
  restart: always
  volumes:
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  #uncomment and set to URL where metasfresh will be available from browsers
  #environment:
    - WEBAPI_URL=https://my.domain.com:8443

but it results in the below error,

Creating metasfresh_webui_1    ... error

ERROR: for metasfresh_webui_1  Cannot create container for service webui: b'invalid mode: 8443'

ERROR: for webui  Cannot create container for service webui: b'invalid mode: 8443'
ERROR: Encountered errors while bringing up the project.

trying to build for standard TLS port 443 https://my.domain.com results in the below error,

Creating metasfresh_webui_1 ... error

ERROR: for metasfresh_webui_1  Cannot create container for service webui: b'create WEBAPI_URL=https: "WEBAPI_URL=https" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path'

ERROR: for webui  Cannot create container for service webui: b'create WEBAPI_URL=https: "WEBAPI_URL=https" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path'
ERROR: Encountered errors while bringing up the project.

I’m looking for running metasfresh-docker on custom port 8443 behind caddy server; so that, external requests to https://my.domain.com to be directed by caddy to https://my.domain.com:8443 internally.

Please advise, Thanks.

Hi @OnlineAlone

Looks like you forgot to uncomment environment: since it’s a new “section”.
If it’s not uncommented, docker-compose thinks it belongs to the section above volumes: - that’s why you get this weird error.

It should look like this:

...
  restart: always
  volumes:
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  #uncomment and set to URL where metasfresh will be available from browsers
  environment:
    - WEBAPI_URL=https://my.domain.com:8443

(beware indentations)

Cheers.

Thanks @julian.bischof

On other note, please advise on changing WEBAPI_URL later on after getting the platform running.
I want to deploy it on VPS using IP address before I get it pointed by URL with TLS certificate.

Cheers,

metasfresh is installed by docker and waited long till the database being populated but still showing the blank page as below,

webui:
  build: webui
  links:
    - webapi:webapi
  ports:
    - "8080:80"
    - "8443:443"
  restart: always
  volumes:
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  #uncomment and set to URL where metasfresh will be available from browsers
  #environment:
    #- WEBAPI_URL=http://example.com:8080

WEBAPI_URL entry were left commented (as it is) to allow access by IP address for now and only port 8080 is working while port 8443 doesn’t respond.

Please advise, Thanks

Hello,

I am getting same issue, almost 1 hour after launch docker-compose up -d, but still blank page.
Anyone knows what could be the issue?
Thank you.