Deploy wt app with wthttp
Added by Marcelo Antunes over 3 years ago
From this topic (https://redmine.webtoolkit.eu/boards/2/topics/17147) i'm trying to deploy my apps with wthttp instead fcgi.
I want to host two apps (listening different ports) on the same server.
I'm in the beginning, so firstly i want to be able to run the wt apps, after i will use haproxy.
But i have two doubts:
1 - How do i make the apps start on system boot?
2 - How to make them restart automatically when a SEGFAULT (or other problem) happens?
Regards
Marcelo
Replies (2)
RE: Deploy wt app with wthttp - Added by Samuel Quevauvillers over 3 years ago
Hi, I did the same, with HAProxy.
You need to setup a service for your 2 apps.
In you .service file, add the Restart directive to automatically restart your app.
See the doc of your linux distro to it...
eg :
[Unit]
Description=Serveur WEB ...
[Service]
Type=simple
#ExecStart=/data1/Forestimator/build-WebAptitude/WebAptitude --deploy-path=/ --docroot "/data1/Forestimator/data/;/favicon.ico,/resources,/style,/tmp,/data,/js,/jslib" --http-port 82 --http-addr 0.0.0.0 -c /data1/Forestimator/data/wt_config.xml
Restart=always
[Install]
WantedBy=multi-user.target