volkszaehler.org
volkszaehler.org copied to clipboard
Push server should be enabled by default
To avoid having to edit another file for proper push server operation in the frontend, this should be enabled by default
Der PushServer wird immer genutzt, siehe https://github.com/volkszaehler/volkszaehler.org/blob/master/htdocs/js/init.js#L141. Die Frage ist eher, welches die „Standard“ Installationsmethode ist, so dass er auch an der richtigen Stelle erwartet wird?
For docker deployment this doesn't work without editing the options.js: the parser.port will result in 8080 while the push server container is set to use 8082
That's why I suggested that change. The repo should lead to a ready-to-run state directly after pulling, be it dockerized or not. Do you agree?
The correct title would be "Try to use push server by default", because this changes nothing on the server side, only the client (frontend) will change its behaviour. I think this is change is over-simplified. Not everybody is using push-server and not everybody has VZ running in a container. I would not like the frontend suddenly connecting to a server port that may well be used for something else.
I'm no docker experts, but aren't there simple means to modify files when setting up a container? Another possibility would be to split out this part of the configuration (or split the whole file, there are some parts that are not really "options").
It is possible to overwrite single files and directories. Here's a snapshot of my docer-compose.yml file where I modify the settings:
volumes:
- /docker/data/volkszaehler/etc:/vz/etc
- /docker/data/volkszaehler/htdocs/js/options.js:/vz/htdocs/js/options.js
- /docker/data/volkszaehler/htdocs/js/init.js:/vz/htdocs/js/init.js
or use sed to activate usage of the push server