volkszaehler.org icon indicating copy to clipboard operation
volkszaehler.org copied to clipboard

Push server should be enabled by default

Open bgewehr opened this issue 4 years ago • 2 comments

To avoid having to edit another file for proper push server operation in the frontend, this should be enabled by default

bgewehr avatar Dec 23 '19 22:12 bgewehr

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?

andig avatar Dec 24 '19 08:12 andig

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?

bgewehr avatar Dec 24 '19 14:12 bgewehr

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").

jahir avatar May 19 '23 07:05 jahir

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

Feilner avatar May 21 '23 09:05 Feilner

or use sed to activate usage of the push server

jahir avatar May 21 '23 10:05 jahir