-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running WebDC3 as standalone with gunicorn #19
Comments
I'm not familiar with gunicorn, but unless it has built-in webserver functionality to serve static files (index.html, css, javascript, images), you may need to run it in combination with a web server like nginx. We are actually running nginx+uwsgi. |
Interesting. Can you share NGINX config somewhere, please? My aim is to get
it all running in Docker.
…On Fri, 12 Jul 2019, 19:21 andres-h, ***@***.***> wrote:
I'm not familiar with gunicorn, but unless it has built-in webserver
functionality to serve static files (index.html, css, javascript, images),
you may need to run it in combination with a web server like nginx. We are
actually running nginx+uwsgi.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=AC33O25FHNVTKNPTH2RP47TP7DDQ3A5CNFSM4ICNRTA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ2QD3A#issuecomment-510984684>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC33O27QPYM43ZIQTNRCWW3P7DDQ3ANCNFSM4ICNRTAQ>
.
|
Here is the nginx config that I dropped in /etc/nginx/conf.d: server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } location = / { return 301 /webdc3/; } location /webdc3/data/ { return 404; } location /webdc3/wsgi/ { include uwsgi_params; uwsgi_pass localhost:9000; } } If you use gunicorn, you'd probably use "proxy_pass" instead of "uwsgi_pass". We run uwsgi using: source <(/sbin/setuser sysop /home/sysop/seiscomp3/bin/seiscomp print env) exec /usr/bin/uwsgi --master --processes 8 --die-on-term --socket 127.0.0.1:9000 --uid sysop --plugins syslog,python --logger syslog --manage-script-name --mount /webdc3/wsgi=/var/www/html/webdc3/wsgi/webdc3.wsgi |
Thanks. I'll have a go and let you know how I get on. |
@volcan01010 Did you dockerized it? It will save a lot of time, if you could share it. |
Hi all, Has anyone created a Docker container for webdc3? Thanks, |
Hi,
I realise that this is not the preferred method, but I am trying to run WebDC3 from a user home directory, without Apache (I have permission problems accessing system level folders on server). I am using the gunicorn wsgi runner for Python.
I have been following the instructions in
operator.rst
. I have symlinked mywebinterface.cfg
into theseiscomp3/etc/
directory and set theSERVER_FOLDER
. I copied the generic html files to the project root directory.The repository is checkout out in
/home/eida/webdc3/webdc3-github
. I use the following command to start the server from within thewsgi
directory:gunicorn webinterface:application --log-level DEBUG \ --chdir /home/eida/webdc3/webdc3-github \ --env SEISCOMP_ROOT=/home/eida/seiscomp3 \ --env LD_LIBRARY_PATH=/home/eida/seiscomp3/lib \ --env PYTHONPATH="/home/eida/webdc3/webdc3-github/wsgi;/home/eida/seiscomp3/lib/python"
When I try to access the webserver, I get 404 errors. e.g.
curl localhost:8000/
curl localhost:8000/index.html
curl localhost:8000/webinterface
The debug logs record the GET requests.
However the following query does work:
curl localhost:8000/request/types
.Do you have any idea how I can fix this?
Thanks,
John
The text was updated successfully, but these errors were encountered: