FreeBSD fresh install: questions and switching from dev to prod
  • Hi Guys! Please, would be great if someone kindly help me.

    I managed to install booktype on my local FreeBSD server and now I have some questions. I'm using nginx + fastcgi and used this to guide me https://www.digitalocean.com/community/tutorials/how-to-publish-books-with-booktype-on-debian-8

    1) This need to be done everytime I turn on my server my server?
    # Load environment variables
    source /var/www/mybooktype/mybook/booki.env
    # Start FastCGI process (Basic example)
    django-admin.py runfcgi host=127.0.0.1 port=8000
    <br>
    2) I'm working in a dev profile. How to properly switch to production? I need to create a new instance to do that or just change the variable to production and restart it?

    3) I read somewhere that mpdf doesn't work in FreeBSD. Anyone can confirm this?

    4) When I upload a image to be shown on "anonymous page image" a broken image icon appears on front page. Favicon isn't showing too,

    Thanks in advance, and sorry for my english.
  • 3 Comments sorted by
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Willian,

    Your English is fine, no need to apologise :-) I'll answer your questions by number...

    1. The example at https://wiki.sourcefabric.org/display/Booktype/How+to+use+Booktype+with+Nginx is old and meant for development. I read on https://code.djangoproject.com/wiki/DjangoAndNginx that fastcgi is deprecated. You might want to look at https://uwsgi.readthedocs.io/en/latest/tutorials/Django_and_nginx.html instead.

    2. Just set
    PROFILE_ACTIVE = 'prod'
    in settings/base.py and reload the web server. There is no need for a separate instance.

    3. I never tried mPDF on FreeBSD but try https://github.com/mpdf/mpdf/releases/tag/v6.1.0 and please file an issue there if it does not run.

    4. Could be a template or hostname issue. What URL is the web interface trying to pull the images from, and are they valid?

    Cheers!

    Daniel
  • Hi Daniel!  Thanks for your fast reply.

    1) I will try using uwsgi. Thanks.

    2) Now it's fine, had to change in env file too.

    3) I will test in a few minutes and report back.

    4) Permission on file is wrong (600). Media uploaded to books are shown just fine.

    5) I noticed there is no way to export Booktype books and re-import them (clone book) and isn't possible to import chapters from another book. I saw this on 1.6 version manual pages. These functions are missing/being reworked on master? Which version show I use?


    PS: after trying hackpad, firepad, etherpad, titanpad, this is by far the best software for collaborative editing. Thank you very much.
    Post edited by Willian Dolence Ribeiro at 2016-12-02 21:05:03
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Willian,

    You're welcome :-) The native export and re-import (cloning) feature is deprecated in Booktype 2.x. because we now support EPUB export and import. Previously in Booktype 1.6.x we used a custom internal format but that did not interoperate with other systems. A side effect of this change is that we no longer have the feature to import just one chapter of another book.

    Cheers!

    Daniel