These are chat archives for allegro/ralph

20th
Feb 2018
Vladislav Solovei
@vladsol
Feb 20 2018 12:01
Guys? It is possible to start ralph without vagrant?
Roman Prykhodchenko
@romcheg
Feb 20 2018 12:02
@vladsol sure -- we supply ready to use docker compose config
alternatively it's possible to run it on your bare host
Vladislav Solovei
@vladsol
Feb 20 2018 12:16
@romcheg Yes, I'm interested in running on a bare host. But, unfortunately, I don't have the ability to use ubuntu.
CentOS 7?
I have already installed python, pyenv, npm, bower... "make install" - with no errors.
But i can't find the "ralph" python script. I need to create it somehow?
Roman Prykhodchenko
@romcheg
Feb 20 2018 12:19
basically there's no python script that you run in order to start Ralph
currently there are a few manual steps you have to follow in order to set ralph up at your bare host
do you have a mysql server running?
Vladislav Solovei
@vladsol
Feb 20 2018 12:24
@romcheg Yes.
Roman Prykhodchenko
@romcheg
Feb 20 2018 12:25
then ensure you are in the Ralph directory and run pip3 install -e .
Vladislav Solovei
@vladsol
Feb 20 2018 12:29
@romcheg Done. Now, i have "/opt/ralph/bin/ralph" )
@romcheg Do i need to set the "MYSQL_*" environment variables ?
Roman Prykhodchenko
@romcheg
Feb 20 2018 12:33
now you have two options -- you either create a db called ralph_ng and a user called the same and having the same password or you create you custom db and user and change Ralph's settings
Vladislav Solovei
@vladsol
Feb 20 2018 12:44
@romcheg ralph migrate ?
Roman Prykhodchenko
@romcheg
Feb 20 2018 12:44
yup
Vladislav Solovei
@vladsol
Feb 20 2018 12:45
@romcheg Done)
Roman Prykhodchenko
@romcheg
Feb 20 2018 12:45
cool
now you can test if it works bu running ralph runserver 8000 - you can choose another port
for sure you need to create a user first :)
ralph createsuperuser
Vladislav Solovei
@vladsol
Feb 20 2018 12:50
@romcheg :( Server Error (500)
Roman Prykhodchenko
@romcheg
Feb 20 2018 12:53
could you please post what you have in logs
Vladislav Solovei
@vladsol
Feb 20 2018 12:53
I can't find any *.log files :)
Roman Prykhodchenko
@romcheg
Feb 20 2018 12:53
ah, sure, you don't have too much output
export RALPH_DEBUG=1
and then run it again
Vladislav Solovei
@vladsol
Feb 20 2018 12:58
@romcheg with RALPH_DEBUG=1 there is no HTTP 500
@romcheg But, i see some 404 errors while requesting some js and css files
[20/Feb/2018 13:55:53] "GET /static/css/ralph.css HTTP/1.1" 404 1657
Roman Prykhodchenko
@romcheg
Feb 20 2018 13:00
Right
That's expected for now
Frontend, i. e., JS and CSS stuff has to be built now. Just run node_modules/.bin/gulp
I know that sounds like a lot of steps -- we are working on making a simple package for it
Vladislav Solovei
@vladsol
Feb 20 2018 13:02
@romcheg Wow :) It's works!
@romcheg Thank you! :)
Roman Prykhodchenko
@romcheg
Feb 20 2018 13:04
awesome
now you're probably interested to have that running as a service, aren't you?
Vladislav Solovei
@vladsol
Feb 20 2018 13:05
@romcheg Yes)
Roman Prykhodchenko
@romcheg
Feb 20 2018 13:06
Do you know how to run gunicorn?
it is already installed, since you've performed make install
the configuration file for gunicorn is located in contrib/gunicorn.py.ini
Vladislav Solovei
@vladsol
Feb 20 2018 14:17
@romcheg I have configured nginx + supervisord + gunicorn)
But there are problems with the paths to some js
@romcheg on example, requested domain.com/static/admin/js/jquery.js, but theres is no "admin" directory in "src/static" .
Roman Prykhodchenko
@romcheg
Feb 20 2018 14:22
@vladsol basically you don't need nginx in this bundle
ralph uses whitenoise to serve static files
Erik Smedinga
@ErikSmedinga
Feb 20 2018 14:23
How can I change the password of a user?
Roman Prykhodchenko
@romcheg
Feb 20 2018 14:25
@vladsol and I suppose it's not going to be a heavily loaded by external users, so whitenoise will work from the box
so go directly to gunicorn and check if you get static files
Arkadiusz Adamski
@ar4s
Feb 20 2018 14:27
Vladislav Solovei
@vladsol
Feb 20 2018 14:29
@romcheg Unfortunately, no :(
@romcheg for all of "/static/" i getting 404
Arkadiusz Adamski
@ar4s
Feb 20 2018 14:31
@vladsol please run ralph collectstatic --noinput
Vladislav Solovei
@vladsol
Feb 20 2018 14:43
2620 static files copied to '/opt/ralph/ralph/src/ralph/var/static'
Roman Prykhodchenko
@romcheg
Feb 20 2018 14:43
looks good
@ar4s ^
Arkadiusz Adamski
@ar4s
Feb 20 2018 14:45
+1
Vladislav Solovei
@vladsol
Feb 20 2018 14:46
@romcheg But... Nothing changeds.
Arkadiusz Adamski
@ar4s
Feb 20 2018 14:48
@vladsol you run gunicorn behind nginx?
Vladislav Solovei
@vladsol
Feb 20 2018 14:49
No. only gunicorn. nginx is stopped.
Maybe, i need to specify static files location for unicorn?
Somehow...)
Roman Prykhodchenko
@romcheg
Feb 20 2018 14:53
@vladsol well, we have examined the code with @ar4s... and looks like we aparently forgot to merge whitenoise... somehow...
Vladislav Solovei
@vladsol
Feb 20 2018 14:53
Oops :)
Roman Prykhodchenko
@romcheg
Feb 20 2018 14:54
so you can take the configuration file for nginx from contrib/ and adapt it for your needs
Vladislav Solovei
@vladsol
Feb 20 2018 14:54
So, at this moment, i can use nginx )
Roman Prykhodchenko
@romcheg
Feb 20 2018 14:54
right
sorry for the confusion
Erik Smedinga
@ErikSmedinga
Feb 20 2018 14:58
Great, every time I try to logon with a newly created user I get a Server Error (500). Before I can logon again I have to clear my cookies for Ralph.
Roman Prykhodchenko
@romcheg
Feb 20 2018 15:05
@ErikSmedinga could you please enable debug and post some logs when you have this error?
Erik Smedinga
@ErikSmedinga
Feb 20 2018 15:09
It's the online environment.
Vladislav Solovei
@vladsol
Feb 20 2018 15:12
Exception Value:
(1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")
When i trying to add DC
Roman Prykhodchenko
@romcheg
Feb 20 2018 15:25
@vladsol what charset and collation is set for your DB?
Vladislav Solovei
@vladsol
Feb 20 2018 15:26
@romcheg My fault) looks like latin1 is set by default.
Roman Prykhodchenko
@romcheg
Feb 20 2018 15:27
Well, then it's easy to fix :)
@ErikSmedinga then the logs should be in your log file
Arkadiusz Adamski
@ar4s
Feb 20 2018 15:46
by default Ralph store log in /tmp/ralph.log