Compare commits
No commits in common. "d7a385fd45aa6ddef4d02d7db6f90de89e64217f" and "88fcb17dc508a92acfa33098329bf0f5ae8b06d0" have entirely different histories.
d7a385fd45
...
88fcb17dc5
@ -1,15 +1,12 @@
|
|||||||
{
|
{
|
||||||
"CALIBRE_DIR": "/usr/src/app/calibredir",
|
"CALIBRE_DIR": "PATH\\TO\\your\\calibre\library",
|
||||||
"SECRET_KEY": "u(8^+rb%rz5hsx4v^^y(ul7g(4n7a8!db@s*9(m5cs*2_ppy8+",
|
"SECRET_KEY": "u(8^+rb%rz5hsx4v^^y(ul7g(4n7a8!db@s*9(m5cs*2_ppy8+",
|
||||||
"ALLOWED_HOSTS": [
|
"ALLOWED_HOSTS": [
|
||||||
"127.0.0.1"
|
"127.0.0.1"
|
||||||
],
|
],
|
||||||
"INTERNAL_IPS": [
|
"INTERNAL_IPS": [
|
||||||
"127.0.0.1"
|
"127.0.0.1"
|
||||||
],
|
],
|
||||||
"DEBUG" : true,
|
"DEBUG" : false,
|
||||||
"LOGFOLDER" : "/usr/src/app/data/logs/",
|
"LOGFILE" : "/home/massiveatoms/Desktop/logs/django.log"
|
||||||
"ISDOCKER" : true
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
21
README.md
21
README.md
@ -24,10 +24,24 @@ Django 3.0
|
|||||||
Calibre 4.13 (I have not tested it with anything else atm, will be resolved later)
|
Calibre 4.13 (I have not tested it with anything else atm, will be resolved later)
|
||||||
|
|
||||||
# how to use:
|
# how to use:
|
||||||
1. [Docker setup](./deployment/instructions.md#user-content-docker-detup)
|
1. clone repo
|
||||||
2. [Non Docker setup](./deployment/instructions.md#user-content-non-docker-detup)
|
2. Remove the `.bak` from `./CalibreWebCompanion/settings.json.bak` and `db.sqlite3.bak`
|
||||||
|
3. Edit `./CalibreWebCompanion/settings.json`. Definitely change the secret key
|
||||||
|
4. Not sure if the db needs to be regenerated, but we'll see later __!!!!!!!!!!__
|
||||||
|
5. pip install -r requirements.txt
|
||||||
|
6. install gunicorn and nginx
|
||||||
|
7. move this nginx.conf to /etc/nginx
|
||||||
|
8. make whatever user nginx runs as (in this case, massiveatoms) the owner of calibredir
|
||||||
|
9. give execute permissions to parent of calibredir
|
||||||
|
10. cd to repo, run `gunicorn CalibreWebCompanion.wsgi`
|
||||||
|
11. start nginx `sudo systemctl restart nginx`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`./CalibreWebCompanion`
|
||||||
|
run `./manage.py runserver`
|
||||||
|
|
||||||
# Ignore pretty much everything below if you're not working on the project
|
# Ignore pretty much everything below if you're not working on the project
|
||||||
|
|
||||||
# Profiling
|
# Profiling
|
||||||
@ -60,8 +74,7 @@ You can then go to [http://localhost:8089/](http://localhost:8089/) to see live
|
|||||||
- [ ] cache with vary headers
|
- [ ] cache with vary headers
|
||||||
- [ ] localisation
|
- [ ] localisation
|
||||||
- [ ] Beautifying template (only works well on 720p, no other viewports)
|
- [ ] Beautifying template (only works well on 720p, no other viewports)
|
||||||
- [ ] Setup email functionality (atm, there's only a dummy one, and you can't reset passwords)
|
- [ ] Setup email functionality
|
||||||
- [ ] isolate the styling and templates, so we can swap them out by just swapping directory content
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,45 +1,36 @@
|
|||||||
|
# non docker stuff
|
||||||
|
1. clone repo
|
||||||
|
2. pip install -r requirements.txt
|
||||||
|
3. install gunicorn and nginx
|
||||||
|
4. move this nginx.conf to /etc/nginx
|
||||||
|
5. make whatever user nginx runs as (in this case, massiveatoms) the owner of calibredir
|
||||||
|
6. give execute permissions to parent of calibredir
|
||||||
|
7. cd to repo, run `gunicorn CalibreWebCompanion.wsgi`
|
||||||
|
8. start nginx `sudo systemctl restart nginx`
|
||||||
|
|
||||||
# Docker setup (no provided docker image atm)
|
Slight issues with this atm:
|
||||||
1. clone the repo
|
1. server_name in nginx.conf needs to be changed
|
||||||
2. rename ./calireWebCompanion/settings.json.bak to settings.json
|
2. User needs to be edited in nginx.conf, now it's just my user acc. This affectd step 4-6
|
||||||
3. change the secret key
|
3. where to do ssl?
|
||||||
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
|
Suggestions:
|
||||||
|
1. We might want to use sockets instead of ip/port?
|
||||||
|
2. logging
|
||||||
|
3. autostart gunicorn/nginx
|
||||||
|
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 80:80\
|
docker run --publish 8000:80\
|
||||||
-v '/home/massiveatoms/Desktop/logs:/usr/src/app/data' \
|
-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' \
|
-v '/run/media/massiveatoms/1AEEEA6EEEEA421D/Documents and Settings/MassiveAtoms/Documents/Calibre Library/:/usr/src/app/calibredir' \
|
||||||
--name cw calibreweb:1.0.1
|
--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`
|
Docker stuff to fix:
|
||||||
|
1. permission/ownership issue with volumes and nginx
|
||||||
Issues with it at the moment:
|
2. we need a setup script that changes secretkey, and generates the default db
|
||||||
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
|
|
Loading…
Reference in New Issue
Block a user