calibre-web-companion/deployment/instructions.md
2020-08-16 02:06:22 -03:00

1.8 KiB

Docker setup (no provided docker image atm)

  1. clone the repo
  2. rename ./calireWebCompanion/settings.json.bak to settings.json
  3. change the secret key
  4. run build --tag calibreweb:1.0 . -f ./deployment/Dockerfile to build the image
  5. run your container with your bind/mount your volumes/paths/things Here's an example of step 5
docker run --publish 80:80\ 
-v '/home/massiveatoms/Desktop/logs:/usr/src/app/data' \
-v '/run/media/massiveatoms/1AEEEA6EEEEA421D/Documents and Settings/MassiveAtoms/Documents/Calibre Library/:/usr/src/app/calibredir' \
--name cw calibreweb:1.0.1

your Calibre path/volume/whatever needs to be mounted at /usr/src/app/calibredir, and you need to mount a volume for the db and logs at /usr/src/app/data

Issues with it at the moment:

  1. we still need to do something to create a random secret key. Atm, this would still

Docker (provided image)

not done yet

non docker setup

this might need to be modified, since some things have changed to adapt it for docker setup

  1. clone repo
  2. pip install -r requirements.txt
  3. rename the settings.json.bak to settings.json, change logging folder, change secret key, set isdocker to false
  4. install gunicorn and nginx
  5. move this nginx.conf to /etc/nginx
  6. create a user and group www
  7. make whatever user nginx runs as (for now, www) the owner of calibredir
  8. give execute permissions to parent of calibredir
  9. cd to repo, run gunicorn CalibreWebCompanion.wsgi
  10. start nginx sudo systemctl restart nginx
  11. make steps 9 and 10 happen on startup?

Slight issues with this atm:

  1. where to do ssl?

Suggestions:

  1. We might want to use sockets instead of ip/port?
  2. autostart gunicorn/nginx
  3. some extra instrumentation for gunicorn https://docs.gunicorn.org/en/latest/deploy.html