1.3 KiB
1.3 KiB
non docker stuff
- clone repo
- pip install -r requirements.txt
- install gunicorn and nginx
- move this nginx.conf to /etc/nginx
- make whatever user nginx runs as (in this case, massiveatoms) the owner of calibredir
- give execute permissions to parent of calibredir
- cd to repo, run
gunicorn CalibreWebCompanion.wsgi
- start nginx
sudo systemctl restart nginx
Slight issues with this atm:
- server_name in nginx.conf needs to be changed
- User needs to be edited in nginx.conf, now it's just my user acc. This affectd step 4-6
- where to do ssl?
Suggestions:
- We might want to use sockets instead of ip/port?
- logging
- autostart gunicorn/nginx
- some extra instrumentation for gunicorn https://docs.gunicorn.org/en/latest/deploy.html
docker stuff
here are the commands i use to build and run:
- build --tag calibreweb:1.0.1 . -f ./deployment/Dockerfile
docker run --publish 8000: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
Docker stuff to fix:
- permission/ownership issue with volumes and nginx
- we need a setup script that changes secretkey, and generates the default db