These are chat archives for allegro/ralph

1st
Feb 2017
Marco Lanzotti
@rastakozza
Feb 01 2017 08:34
is there some rc script or systemd config to run ralph on startup?
Pete
@kasim1r
Feb 01 2017 08:35
+1 for @rastakozza 's request :)
Marco Lanzotti
@rastakozza
Feb 01 2017 09:55
tried something like this
[Unit]
Description=Ralph 3
After=network.target

[Service]
EnvironmentFile=-/etc/default/ralph
ExecStart=/opt/ralph/ralph-core/bin/ralph runserver $LISTEN
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=ralph.service
for systemd
it works
Mateusz Kurek
@mkurek
Feb 01 2017 09:57
@rastakozza cool! could you make PR with this? to contrib dir and/or to DEB package? :)
Marco Lanzotti
@rastakozza
Feb 01 2017 09:59
very busy now, i will do ASAP
Mateusz Kurek
@mkurek
Feb 01 2017 09:59
sure, thanks a lot!
Marco Lanzotti
@rastakozza
Feb 01 2017 10:00
setting RALPH_DEBUG=0 it replies 500 to http requests
Mateusz Kurek
@mkurek
Feb 01 2017 10:01
try to run ralph collectstatic first
Marco Lanzotti
@rastakozza
Feb 01 2017 10:03
now I receive a 404 to js and css requests...
Mateusz Kurek
@mkurek
Feb 01 2017 10:05
ok. that's because runserver, when it's running in non-debug mode, does not serve static files. You should put it behind some reverse proxy, for example nginx. Take a look at example config here: https://github.com/allegro/ralph/blob/ng/contrib/ralph.conf.nginx
Marco Lanzotti
@rastakozza
Feb 01 2017 10:08
i receive requests like:
[01/Feb/2017 11:03:09] "GET /static/vendor/js/modernizr.c1ff1650bba6.js HTTP/1.1" 404 116
but I only have file /static/vendor/js/modernizr.js
no /static/vendor/js/modernizr.c1ff1650bba6.js
Mateusz Kurek
@mkurek
Feb 01 2017 10:12
check /var/static/... directory inside ralph - there should be collected staticfiles
(inside ralph directory)
Marco Lanzotti
@rastakozza
Feb 01 2017 10:13
ok, thank you!