Open kyao opened 3 years ago
@ChanaChelem , you need to turn the t2wml backend into a service. We already use pyinstaller to create t2wml-server.exe (you can look at the script backend/packaging/prepare_installation.py
- it runs pyinstaller with the proper flags, before packaging electron as well).
First thing you need to do figure out how to add waitress to t2wml - waitress is the Windows equivalent of gunicorn - it will run multiple backend instances and load balance requests between them. Start by creating a t2wml-waitress.py that will run t2wml under waitress. Once it runs (python t2wml-waitress.py
starts the backend with waitress), use pyinstaller to create t2wml-waitress.exe .
Now you need to turn this into a service. Create a file called t2wml-service.py
that will implement the technique mentioned [here] (https://metallapan.se/post/windows-service-pywin32-pyinstaller/) . You will probably need to replace MyService()
with a class that starts and stops the waitress server.
The service should listen on localhost:13000, and only accept connections from the local machine (do not listen on 0.0.0.0:13000), as Causex will place it behind a reverse proxy.
For now the CX folks just want something that can run on Windows. Integration with IIS is not needed.
@zmbq @ChanaChelem Can we get a version that runs on Windows first without the integration with IIS?
Run on Windows Server with IIS.