2020-08-15 14:00:25 +00:00
|
|
|
# non docker stuff
|
2020-08-02 01:47:12 +00:00
|
|
|
1. clone repo
|
|
|
|
2. pip install -r requirements.txt
|
|
|
|
3. install gunicorn and nginx
|
2020-08-02 02:51:34 +00:00
|
|
|
4. move this nginx.conf to /etc/nginx
|
2020-08-02 01:47:12 +00:00
|
|
|
5. make whatever user nginx runs as (in this case, massiveatoms) the owner of calibredir
|
|
|
|
6. give execute permissions to parent of calibredir
|
2020-08-02 14:21:43 +00:00
|
|
|
7. cd to repo, run `gunicorn CalibreWebCompanion.wsgi`
|
2020-08-02 02:51:34 +00:00
|
|
|
8. start nginx `sudo systemctl restart nginx`
|
2020-08-02 01:47:12 +00:00
|
|
|
|
|
|
|
Slight issues with this atm:
|
2020-08-02 14:54:47 +00:00
|
|
|
1. server_name in nginx.conf needs to be changed
|
2020-08-02 02:51:34 +00:00
|
|
|
2. User needs to be edited in nginx.conf, now it's just my user acc. This affectd step 4-6
|
2020-08-02 14:54:47 +00:00
|
|
|
3. where to do ssl?
|
2020-08-02 01:47:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
Suggestions:
|
|
|
|
1. We might want to use sockets instead of ip/port?
|
|
|
|
2. logging
|
2020-08-02 02:51:34 +00:00
|
|
|
3. autostart gunicorn/nginx
|
2020-08-15 14:00:25 +00:00
|
|
|
4. 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:
|
|
|
|
1. build --tag calibreweb:1.0.1 . -f ./deployment/Dockerfile
|
|
|
|
2.
|
|
|
|
```
|
|
|
|
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:
|
|
|
|
1. permission/ownership issue with volumes and nginx
|
|
|
|
2. we need a setup script that changes secretkey, and generates the default db
|