librelist archives

« back to archive

Isso and Github pages

Isso and Github pages

From:
Mehdi Sadeghi
Date:
2015-06-15 @ 08:22
Hi there,

I use Github pages to publish my pages. I have also a VPS. Is it possible
to install isso on a server and serve the pages from another webserver, in
this case Github Pages. I mean the cross origin problems.

Regards
Mehdi

Re: [isso] Isso and Github pages

From:
Martin Zimmermann
Date:
2015-06-15 @ 10:41
Hi Mehdi,

if you control the server-side, you can use Isso on different domains.
Just make sure, you set

  [general]
  host = http://username.github.io/

for example, and it should work.

Regards,
Martin

Re: [isso] Isso and Github pages

From:
Mehdi Sadeghi
Date:
2015-06-17 @ 20:52
Hi Martin,

I tried a few hours to make isso work, however I did not succeed. It's hard
to figure out how to have a working system.

I have a Debian Jessie VPS, I installed isso in virtualenv and I can run
issue:

(isso)root@mehdix:/opt/isso# isso run
2015-06-17 16:46:10,403 INFO: connected to http://mehdix.org/

and this is my /etc/isso.conf file:
[general]
dbpath = /opt/isso/comments.db
host = http://mehdix.org/
[server]
listen = http://mehdix.org:4001/

and here is my sample page:

<!DOCTYPE html>
<html>
<head>
 <script data-isso="mehdix.org:4001"
            src="http://posativ.org/isso/api/js/embed.min.js"></script>
</head>
<body>
<section id="isso-thread"></section>
</body>
</html>

I also tried installing systemd service which gives me the error, so I run
isso directly:

(isso)root@mehdix:/opt/isso# systemctl status isso.service
● isso.service - lightweight Disqus alternative
   Loaded: loaded (/usr/lib/systemd/system/isso.service; enabled)
   Active: failed (Result: exit-code) since Wed 2015-06-17 16:34:55 EDT;
14min ago
  Process: 32479 ExecStart=/usr/bin/gunicorn --log-file /var/log/isso.log
--preload isso.run (code=exited, status=217/USER)
 Main PID: 32479 (code=exited, status=217/USER)

Jun 17 16:34:55 mehdix.org systemd[32479]: Failed at step USER spawning
/usr/bin/gunicorn: No such process
Jun 17 16:34:55 mehdix.org systemd[1]: isso.service: main process exited,
code=exited, status=217/USER
Jun 17 16:34:55 mehdix.org systemd[1]: Unit isso.service entered failed
state.

BTW Gunicorn is installed and available at /usr/bin/gunicorn.

I tried to setup isso and I was not able to do that using the above
configuration. If there is any obvious failure I appreciate your comment.


Regards
Mehdi




On 15 June 2015 at 12:41, Martin Zimmermann <info@posativ.org> wrote:

> Hi Mehdi,
>
> if you control the server-side, you can use Isso on different domains.
> Just make sure, you set
>
>   [general]
>   host = http://username.github.io/
>
> for example, and it should work.
>
> Regards,
> Martin
>

Re: [isso] Isso and Github pages

From:
Martin Zimmermann
Date:
2015-06-17 @ 22:04
Mehdi Sadeghi (msk1361@gmail.com) schrieb:

> [...]
> and this is my /etc/isso.conf file:
> [general]
> dbpath = /opt/isso/comments.db
> host = http://mehdix.org/

I thought you were using GitHub pages for your actual content (not the
comments). Therefore your 'host' is 'username.github.io' as mentioned
earlier. To get CORS working, you need to whitelist the host, where you
want the JavaScript (here: Isso) executed.

> I also tried installing systemd service which gives me the error, so I run
> isso directly:
> 
> (isso)root@mehdix:/opt/isso# systemctl status isso.service
> ● isso.service - lightweight Disqus alternative
>    Loaded: loaded (/usr/lib/systemd/system/isso.service; enabled)
>    Active: failed (Result: exit-code) since Wed 2015-06-17 16:34:55 EDT;
> 14min ago
>   Process: 32479 ExecStart=/usr/bin/gunicorn --log-file /var/log/isso.log
> --preload isso.run (code=exited, status=217/USER)
>  Main PID: 32479 (code=exited, status=217/USER)

Looks like you are using a virtualenv. Try to install gunicorn inside
the virtualenv and use /opt/isso/bin/gunicorn as executable to run
`isso.preload'.

Hope it helps.

Re: [isso] Isso and Github pages

From:
Mehdi Sadeghi
Date:
2015-06-19 @ 12:47
Thanks Martin,

I was able to make the daemon work correctly. The tricky point here is that
'gunicorn' does not respect isso config environemnt, so setting 'server'
parameter in config file has no effect so it was very confusing. It starts
by default on port 8000 so nginx should proxy to that port; or the systemd
script should be changed to set the port with gunicorn's --bind parameter.

I also managed to run the comment system on a Github page but it does not
look reliable. Some comments work and some are rejected with a 403
Forbidden from nginx.

The page (Github Page) is available here: http://mehdisadeghi.me/test/ to
be tried. I see in browser's console window that the OPTION request gets a
200 OK response, but contains the wrong text – text form previous comment.
This might be a bug indeed. Then the consequent POST requests get's a 403
Forbidden reply.


Regards
Mehdi

On 18 June 2015 at 00:04, Martin Zimmermann <info@posativ.org> wrote:

> Mehdi Sadeghi (msk1361@gmail.com) schrieb:
>
> > [...]
> > and this is my /etc/isso.conf file:
> > [general]
> > dbpath = /opt/isso/comments.db
> > host = http://mehdix.org/
>
> I thought you were using GitHub pages for your actual content (not the
> comments). Therefore your 'host' is 'username.github.io' as mentioned
> earlier. To get CORS working, you need to whitelist the host, where you
> want the JavaScript (here: Isso) executed.
>
> > I also tried installing systemd service which gives me the error, so I
> run
> > isso directly:
> >
> > (isso)root@mehdix:/opt/isso# systemctl status isso.service
> > ● isso.service - lightweight Disqus alternative
> >    Loaded: loaded (/usr/lib/systemd/system/isso.service; enabled)
> >    Active: failed (Result: exit-code) since Wed 2015-06-17 16:34:55 EDT;
> > 14min ago
> >   Process: 32479 ExecStart=/usr/bin/gunicorn --log-file /var/log/isso.log
> > --preload isso.run (code=exited, status=217/USER)
> >  Main PID: 32479 (code=exited, status=217/USER)
>
> Looks like you are using a virtualenv. Try to install gunicorn inside
> the virtualenv and use /opt/isso/bin/gunicorn as executable to run
> `isso.preload'.
>
> Hope it helps.
>