I´m trying to start the compose file for the OpenEMS backend. Startup of the container is working as expected. When going to http://localhost:80 … I´m getting a blank page with following error.
Does anybody have the same issue when starting the compose file?
Logs from the ui container
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────────
_____ _____ _____ _____ _____ _____ _____
| | _ | __| | | __| | __|
| | | __| __| | | | __| | | |__ |
|_____|__| |_____|_|___|_____|_|_|_|_____|
Based on images from linuxserver.io
───────────────────────────────────────────
for further information visit:
https://openems.io/
───────────────────────────────────────
GID/UID: 911/911
───────────────────────────────────────
'/defaults/nginx/dhparams.pem' -> '/etc/nginx/dhparams.pem'
'/defaults/nginx/openems-nginx.conf' -> '/etc/nginx/openems-nginx.conf'
'/defaults/nginx/site-confs/openems.conf' -> '/etc/nginx/site-confs/openems.conf'
'/defaults/nginx/ssl.conf' -> '/etc/nginx/ssl.conf'
generating self-signed keys in /etc/nginx/keys, you can replace these with your own keys if required
..+..........+.........+++++++++++++++++++++++++++++++++++++++*...+.+.................+...............+......+.+...+++++++++++++++++++++++++++++++++++++++*....+....+..+....+...+..+....+............+.........+...+..+.+........+......+.+..+...+............+.......+...+...........+.......+..+...+...............+..........+..+.............+...............+........+.+...+..+.+..+......+....+.......................+.........+...+.......+......+..+.+..+.............+......+.....+....+.....+.+.....+.............+......+.....+.....................+....+......+........+...+.........+.+..+................+......+..................+........+...+............+.......+...........+.........+...+...+.+........+.+..............+...+...+.+......+.........+.......................+.+......+.........++++++
....+......+..+...+......+...+.+++++++++++++++++++++++++++++++++++++++*..+..+++++++++++++++++++++++++++++++++++++++*...+...+.......+...+..+....+..+............+.+..+....+......+...+...............+.........+...+........+...............+....+...+.........+.........+..+.............+..+.........+.+..+...............+.+.....+....+...+..+......+......+......+.............+..+............+...+...+.+.........+.....+......+...+.............+...+.....+.+.....+.+.....+..........+...+.....+.........+.+..+.........+...+......+....+...........+......+.+..+.+............+..+.+.....+....+..+...............+.+...+..+.......+............+........+.+......+...+.....+...+.......+............+.....+.+..+..........+...+............+..+....+............+..+.+..+............+...+...............+...+.......+..............+.+.....+...+.+......+..+.......+....................+....+......+...+........+.......+......+.....+.+........+.............+...+...........+...+...+....+.....+....+..+...+....+...+..+..........+........+...+.+...+............+.....+.+..............+.+.....+...+............+...+...................+..+.+...+..+....+.....+..........+...+.....+......+......+.........+............+.........+..........++++++
-----
[custom-init] No custom files found, skipping...
Maybe the UI_WEBSOCKET environment variable is not working as expected?
I´m trying to build a OpemEMS Backend cluster with a reverse proxy (treafik) in front.
The big goal is to spin up a multiple OpenEMS Backend bundles (Backend, UI, Influx) which is then auto discovered by treafik. Treafik is then creating routes for the exposed ports of the containers.
The autodiscover function of treafik works the best with docker containers.
Has anybody run the OpenEMS Backend in a docker-compose bundle? If not I´m going to investigate a little deeper.
I have similar issues.
I looked into the sourcecode from docker image and it seems that env file was created already correctly (openems/tools/docker/ui/root/etc/s6-overlay/s6-rc.d/init-nginx/run at 4cdae0c315e7ba05c6611ba1e13057d3b7a5b634 · OpenEMS/openems · GitHub). But like @Rayleigh3105 mentioned is the env.js not enabled by default in index.html. So question would be how this should work out of the box? Is there a missing features which have to patch the index.html in the docker case?
After patching it manually with dev tools I’m still not able to open the backend-ui w/o errors (but undefined error was fixed). Current error is empty page w/o an error or failing network request. WS url was not called
Any idea which configuration could cause this issue?
Reason why i want to use the docker containers: I have several different smart home systems running as a docker container on one host system (intel nuc) and then I use portainer to manage the docker instances easily. Normally each smart home system has its own linux OS requirements. With the docker approach I can mix different systems on one host.
I could fixed it. I only tested first the main url w/o path which resolves internally automatically to index.html. But then I saw on the public backend-ui test server, that initial url is /index, which now works. Is there a automatic redirect missing in the nginx config?
But still the missing script include of env.js is the main issue. Because such patching could be solved in many different ways I think the best way would be that docker scripts creator/maintainer would solve the issue. Or should I create a pull request with my simple solution by using sed or something like that in the nginx init script?