Closed hamoid closed 3 years ago
Once you activated the virtualenv, you can install or upgrade isso from the directory it is cloned with python setup.py install
(or /path/to/your/venv/bin/python setup.py install
if you do not want to activate the virtualenv). You can dismiss the clone after that.
For downgrade, it is safer to just wipe your virtualenv and restart from scratch.
Thank you @vincentbernat but I need more details :)
My current isso folder is not cloned, it was installed as a package. The folder contains bin/
, include/
, lib/
, local/
, pip-selfcheck.json
and share/
.
Do you mean I can run python setup.py install
and it will let me switch to the version in GitHub?
Sorry if this is trivial, but I'm not experienced in installing python packages. I just managed to make isso work a few years ago and it's been there undisturbed :)
Did you run pip install isso
inside or outside a virtualenv?
I assume the folder you mention is your virtualenv. You can update it by:
git clone https://github.com/posativ/isso.git
.cd isso; /path/to/your/folder/bin/python setup.py install
.You can discard the isso
directory you got from the clone. You can repeat the step to upgrade. You can also downgrade, but Isso won't handle the database changes, so it's better to save the database and restart from scratch.
How can I figure out if i used virtualenv? I assume I did, because it was recommended in the instructions.
Does setup.py
need to run as root? Or can I specify --install-dir
somewhere to not write into /usr/local
?
Thank you!
I think you forgot to mention
virtualenv .
source ./bin/activate
and that's why it was failing. With them setup is completed successfully. Continuing...
Once more I can't make it work :( First I had CORS errors for an hour, due to having the same domain with and without www. After that, when I call the init.d/isso stop, it does not stop, but I did not realize, so it kept running for another hour confusing me with the lack of changes. Now it seems to run (I see it with top), the pid file shows the right pid, but embed.min.js
is not found.
Update: I installed bower, requirejs, uglify-js, jade, did make init
, make js
, but still same result
So this is what I did:
cd ~
mkdir new
cd new
git clone https://github.com/posativ/isso.git
cd isso
virtualenv .
source ./bin/activate
python setup.py install
npm install bower requirejs uglify-js jade
make init
make js
sudo killall isso -9
sudo rm /var/run/isso.pid
sudo /etc/init.d/isso start
# 301 redirect 80 to https
# 301 redirect www to non-www
location /isso {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Script-Name /isso;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8080;
}
Added admin_password, reply-notifications = true
, rss base = .
, limit = 100
Added
data-isso-reply-notifications="true"
data-isso-feed="true"
In ~/isso/ I have the old setup and it still works fine if I change my init.d script to use it. The new isso from GitHub returns 404 for the js file.
I think some of your commands have failed. Please include the terminal response too.
For exemple you should not do npm install
like you did.
My guess is that it failed at compiling js in some way
Thanks. I didn't want to install the npm packages as root, so I did it locally, and then added the 4 bin folders of those packages to the path temporarily, so the make commands would complete successfully. They finished without any errors.
Are those npm packages required while isso runs? Or only to run make
?
PATH=$PATH:/home/abe/new/isso/node_modules/jade/bin/
PATH=$PATH:/home/abe/new/isso/node_modules/uglify-js/bin/
PATH=$PATH:/home/abe/new/isso/node_modules/requirejs/bin/
PATH=$PATH:/home/abe/new/isso/node_modules/bower/bin/
make init
(cd isso/js; bower --allow-root install almond requirejs requirejs-text jade)
bower almond#* cached https://github.com/jrburke/almond.git#0.3.3
bower almond#* validate 0.3.3 against https://github.com/jrburke/almond.git#*
bower requirejs-text#* cached https://github.com/requirejs/text.git#2.0.15
bower requirejs-text#* validate 2.0.15 against https://github.com/requirejs/text.git#*
bower jade#* cached https://github.com/visionmedia/jade.git#1.11.0
bower jade#* validate 1.11.0 against https://github.com/visionmedia/jade.git#*
bower requirejs#* cached https://github.com/jrburke/requirejs-bower.git#2.3.5
bower requirejs#* validate 2.3.5 against https://github.com/jrburke/requirejs-bower.git#*
make js
make: Nothing to be done for 'js'.
I think some of your commands have failed. Please include the terminal response too.
It seems like no commands failed, right? What would be the way to debug a 404 for the embed.js?
First we see the file is present in your listing so the problem il probably in the http server configuration.
Check the full path to the embed.js
file, check your nginx configuration to ensure they allow to serve such paths.
Ensure isso is running.
Check isso logfiles to search for errors.
404 probably means nginx cannot reach isso (an isso fail would be a 5XX, a forbidden path would be 403) Or that isso cannot find the embed.js (file not existing, file in the wrong location…)
I hope this will help
The server runs without any errors. In the ngnix log I see this:
50.84.190.226 - - [13/Aug/2018:16:40:42 +0200] "GET /isso/js/embed.min.js HTTP/1.1" 404 209 "https://foo.org/bar.html" "Mozilla/5.0 (X11; Lin
ux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
With the new isso I access embed.js and it returns 404. I stop the new server, start the old one, access the same URL, and the file is suddenly there.
Do I need to make any changes to nginx when upgrading isso? May the public-endpoint setting be related to this? I don't know what to try...
This is the diff between the new/old config files:
3c3
< dbpath = /w/isso/foo.db
---
> dbpath = /w/isso/fooNEW.db
13a14,16
> reply-notifications = true
> log-file = /w/isso/issoNew.log
> admin_password = *************
31a35,36
> public-endpoint =
> ; https://foo.org/isso/
51a57,59
> [rss]
> base = .
> limit = 100
I have solved the problem, just change the python setup.py install
to python setup develop
. (09/06/2018)
Here is the previous comments:
I have the same problem, here is my steps
# git clone and generate a virtual environment.
cd isso
python setup.py install
make init
npm install -g requirejs uglify-js jade
make js
ls isso/js
# app build.count.js build.embed.js components config.js count.dev.js
# count.js count.min.js embed.dev.js embed.js embed.min.js lib
# here we can see the embed.min.js
isso -c my_isso_config run
# it shows INFO: connected to ...
However, I cannot find the embed.min.js
or embed.js
by either visit http://commet.example.com/js/embed.min.js
or just curl http://localhost:1234/js/embed.min.js
in the bash, it returns 404.
If I install isso by pip, I can reach the embed.min.js
by just curl http://localhost:1234/js/embed.min.js
. Thus, I think something must be wrong in my source code installation steps.
I think installing from source is well-documented now. @hamoid do you want to close this?
Right. I'll close it and a new issue could be opened if there's any issues upgrading. Thank you!
Hi! I see tons of useful features merged in the repo, but no new releases.
To be able to benefit from those new features, it would be great to have some documentation about how to switch from a running isso installed with
pip install isso
to the version at GitHub.Would it be something like
cd
into the isso folder, delete the content, do git clone, and thenpip install .
? Using virtualenv, right? Is there a way to go back? (probably backup the database and the folder first?). Are there new required/important config settings?Thank you :)