mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Merge branch 'development' into newui
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -125,7 +125,6 @@ dmypy.json
|
|||||||
# End of https://www.gitignore.io/api/python
|
# End of https://www.gitignore.io/api/python
|
||||||
0
|
0
|
||||||
config.backup.json
|
config.backup.json
|
||||||
create_db.sql
|
|
||||||
uwsgi.ini
|
uwsgi.ini
|
||||||
installer.log
|
installer.log
|
||||||
pyshelf_nginx.conf
|
pyshelf_nginx.conf
|
||||||
|
|||||||
20
Dockerfile
vendored
Normal file
20
Dockerfile
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
FROM archlinux:latest
|
||||||
|
RUN pacman -Syy
|
||||||
|
RUN pacman -Syu --noconfirm
|
||||||
|
RUN pacman -S --noconfirm python python-pip git postgresql sudo gcc
|
||||||
|
RUN sudo -u postgres initdb --locale=en_US.UTF-8 -E UTF8 -D /var/lib/postgres/data
|
||||||
|
RUN useradd pyshelf && chpasswd pyshelf:pyshelf
|
||||||
|
#RUN mkdir -p /srv/Books && mkdir -p /srv/http && mkdir -p /srv/logs/ && mkdir -p /run/postgresql && \
|
||||||
|
# touch /srv/logs/pgsql.log && chown postgres.postgres /run/postgresql && \
|
||||||
|
# chown http.pyshelf /srv/Books && chown http.pyshelf /srv/http && chown postgres.postgres /srv/logs/pgsql.log
|
||||||
|
VOLUME /srv/Books ./Books
|
||||||
|
VOLUME /srv/http .
|
||||||
|
VOLUME /srv/logs ./logs
|
||||||
|
VOLUME /var/lib/postgres/data ./pgdata
|
||||||
|
RUN sudo -u postgres pg_ctl -D /var/lib/postgres/data -l /srv/logs/pgsql.log start
|
||||||
|
RUN sudo -u postgres psql -f create_db.sql
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
WORKDIR /srv/http
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
EXPOSE 80 8000
|
||||||
|
CMD ["sh", "-c","/srv/http/entry.sh"]
|
||||||
10
README.md
vendored
10
README.md
vendored
@@ -4,8 +4,7 @@
|
|||||||
<p align="center">Having used Calibre for hosting my eBook collection in the past, I found myself frustrated having to install X on my server, or manage my library externally, Thus I have decided to spin up my own.</p>
|
<p align="center">Having used Calibre for hosting my eBook collection in the past, I found myself frustrated having to install X on my server, or manage my library externally, Thus I have decided to spin up my own.</p>
|
||||||
<p align="center"><a href="https://pyshelf.com">https://pyshelf.com</a></p>
|
<p align="center"><a href="https://pyshelf.com">https://pyshelf.com</a></p>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### You dont need a X server to host a website, or your Movie & Tv collection, so why should you need one to host ebooks?
|
### You dont need a X server to host a website, or your Movie & Tv collection, so why should you need one to host ebooks?
|
||||||
@@ -39,7 +38,7 @@ Follow or influence development @ <p align="center"><b> <a href="https://discord
|
|||||||
* More intuitive, less intrusive, & stays out of the way. <i>caveat: I need to rework the placement of the next & previous page controls. While they do remain usable, I intend to have them follow the users</i>
|
* More intuitive, less intrusive, & stays out of the way. <i>caveat: I need to rework the placement of the next & previous page controls. While they do remain usable, I intend to have them follow the users</i>
|
||||||
position on the page in future releases.
|
position on the page in future releases.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
* New controls
|
* New controls
|
||||||
* Sort
|
* Sort
|
||||||
@@ -50,6 +49,11 @@ Follow or influence development @ <p align="center"><b> <a href="https://discord
|
|||||||
* [ ] Control panel
|
* [ ] Control panel
|
||||||
* [ ] Book details
|
* [ ] Book details
|
||||||
* Whatever else :)
|
* Whatever else :)
|
||||||
|
## Installation Example
|
||||||
|
<a href="https://vimeo.com/382292764" target="_blank">pyShelf Installation Video</a>
|
||||||
|
|
||||||
|
## Further Installation & Support Information
|
||||||
|
* [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md)
|
||||||
|
|
||||||
### Pre-req Dependencies
|
### Pre-req Dependencies
|
||||||
* gcc -- This will be installed by the new pre-installer script if its binary is not detected at /usr/bin/gcc
|
* gcc -- This will be installed by the new pre-installer script if its binary is not detected at /usr/bin/gcc
|
||||||
|
|||||||
2
config.json
vendored
2
config.json
vendored
@@ -1 +1 @@
|
|||||||
{"TITLE": "pyShelf E-Book Server", "VERSION": "0.5.0", "BOOKPATH": "/home/raelon/Books", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"}
|
{"TITLE": "pyShelf E-Book Server", "VERSION": "0.6.0", "BOOKPATH": "", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"}
|
||||||
3
create_db.sql
vendored
Executable file
3
create_db.sql
vendored
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
CREATE USER pyshelf WITH PASSWORD 'pyshelf';
|
||||||
|
CREATE DATABASE pyshelf;
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE pyshelf TO pyshelf;
|
||||||
13
database.sh
vendored
Executable file
13
database.sh
vendored
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
sudo -u postgres pg_ctl -D /var/lib/postgres/data -l /srv/logs/pgsql.log start &&
|
||||||
|
sudo -u postgres psql -f create_db.sql &&
|
||||||
|
rm /srv/http/database.sh &&
|
||||||
|
echo "sudo -u postgres pg_ctl -D /var/lib/postgres/data -l /srv/logs/lgsql.log start" > /srv/http/database.sh &&
|
||||||
|
chmod +x /srv/http/database.sh &&
|
||||||
|
cd src && \
|
||||||
|
python manage.py makemigrations && \
|
||||||
|
python manage.py makemigrations interface && \
|
||||||
|
python manage.py migrate && \
|
||||||
|
python manage.py migrate interface && \
|
||||||
|
cd ..
|
||||||
|
echo "pyShelf Env Started"
|
||||||
Reference in New Issue
Block a user