a1b8b99b13
make Dockerfile add a random value and put it on filesystem to be picked up in main.py -> for app.config['SECRET_KEY]
Damien De Paoli2024-12-07 19:36:19 +11:00
a7abf480f9
generally neaten up invocation of gunicorn - consolidate it to 1 invocation, with correct variables based on prod or not
Damien De Paoli2024-11-16 00:07:12 +11:00
b928b2ff44
use ARG ENV to chown /code for prod to allow gunicorn logs to work in prod as non-root user
Damien De Paoli2024-11-16 00:06:38 +11:00
4d89e06203
added comment to remove hardcoded username/password
Damien De Paoli2024-11-15 23:09:18 +11:00
42a3edb4cc
use sudo of pybook user to run gunicorn, and add timeout of 300 as getting the ebook can be really slow
Damien De Paoli2024-11-15 23:08:58 +11:00
f8ac24ab10
added ARGs for BOOK_UID/BOOK_GID, uses sudo to make that usre and with a home dir, so that Cams install of chrome works using its home dir and Cams added google-chrome and requirements for selenium, etc
Damien De Paoli2024-11-15 23:05:51 +11:00
5c1e1627d9
fix up hamburger menu (bootstrap 4->5, missed a couple of references for the newer navbar). Cam added Get eBook menuitem to Admin
Damien De Paoli2024-11-15 20:29:34 +11:00
5838ada2e3
remove port 5000 and use std 80, and use traefik to route correctly
Damien De Paoli2024-08-25 22:44:45 +10:00
ad99be57e4
remove port 5000 and use std 80, and use traefik to route correctly
Damien De Paoli2024-08-25 22:44:32 +10:00
4721c9dbbd
we dont need port 80, and it breaks traefik port discovery
Damien De Paoli2024-03-10 13:58:55 +11:00
bbe0590b1e
update to use user: 2000:2000 / ARGS in build, and use the python image instead of a full ubuntu image. Also use r to escape regex str
Damien De Paoli2024-02-18 20:37:59 +11:00
668a7066e0
fixed BUG-48 - sub book add/rem -- it was because QuickParentBook used an array and the code had been half converted to just use an object. Fixed to all be an object/dict now and its working again
Damien De Paoli2023-10-02 18:46:00 +11:00
22a625d354
added failsafe to keep container up if python is so broke it kills gunicorn on init
Damien De Paoli2023-10-02 18:45:03 +11:00
234c968fb3
for now had to hard-lock Flask and Werz* to keep flask-ldap working
Damien De Paoli2023-10-02 18:44:35 +11:00
fdec40a2cb
make the image actually update the same way I do in PA
Damien De Paoli2023-10-02 18:44:09 +11:00
c85b3fe4be
added 2 new BUGs, order on shelf is wrong with new books in it? and add sub-book (and rem?) broken
Damien De Paoli2023-10-02 18:42:35 +11:00
eac8660e2c
when we build this container, do a dist-upgrade too, should always get latest updates to base ubuntu image
Damien De Paoli2023-09-13 23:17:39 +10:00
4e8bda4134
move parent[] to parent as the array was never needed, removed some dead code, clarified another example of new BUG-46
Damien De Paoli2023-07-08 15:10:38 +10:00
5166f27657
removed BUG-7 -> added BUG-42 (clarification of BUG-7 and BUG-41), BUG-43 changing author on edit page (in drop-down) does not reset html link, BUG-44 empty message but still triggers if to say there is a message (shows as BUT), BUG-45 creating a new book and failing it loses any series data you have input
Damien De Paoli2023-07-07 18:36:29 +10:00
0803c3cf22
remove loaned books from books on shelf - fixes BUG-38
Damien De Paoli2023-07-05 20:00:28 +10:00
8957771ae1
fixed bug-40, when adding author/<id>/books route, to edit_id.html, I assumed object existed, when creating it did not, now fixed
Damien De Paoli2023-07-05 19:45:42 +10:00
80ce668089
went through book shelves carefully, detected Lost books, and create some more TODOs and some BUGs
Damien De Paoli2023-07-05 19:43:52 +10:00
26349c98d4
added edit author button/link, and fixed broken hover since I changed to bals from author. Also removed the old author code, finally made it so when you hover over remove button we now also highlight the edit button for the author to be red as well. Hovering over edit link higlights the relevant author blue to let you know which one you will go to
Damien De Paoli2023-07-04 23:54:32 +10:00
99b4239633
forgot newer sql alchemy needs separation .join() per table
Damien De Paoli2023-07-04 23:08:23 +10:00
1e7a47f43e
allow Edit Author to show list of books for author
Damien De Paoli2023-07-04 23:00:39 +10:00
ae4fe47093
added removing direct sqls, also put a TODO in for adding a parent book to a series
Damien De Paoli2023-07-02 12:58:42 +10:00
867924fa60
remove use of sql direct for insert into, delete from AND fix bug with parent variable not being set before use - this bug must have been there a while untested AND push FLASK_ENV into config for container, development mode so we can show it better in navbar
Damien De Paoli2023-07-02 12:57:49 +10:00
f4962e5fd8
remove use of sql direct for delete, just use import line as needed to avoid circular import
Damien De Paoli2023-07-02 12:56:23 +10:00
b2d6f38a62
just make container mode visually different in navbar
Damien De Paoli2023-07-02 12:55:30 +10:00
1db94434d5
convert over to classes for all DB tables, it was just my lack of understanding when I first used sqlalchemy
Damien De Paoli2023-07-02 10:45:17 +10:00
df07c810bc
start by sorting by title, so the drop-down is alphabetised by title
Damien De Paoli2023-07-02 10:44:42 +10:00
207f5d7ddb
testing showing quirky bugs in "container" vs "development", think I need to use ORM consistently to update
Damien De Paoli2023-07-02 10:44:17 +10:00
0e7d4676d1
alternate way to find series with missing books to use in series add drop-down - fixes issue with a new series with no bsl yet not showin in list
Damien De Paoli2023-07-01 22:18:09 +10:00
c36474a2f0
fixed BUG-34: possible series list is assuming a NULL sub_book_num is taking up a slot of books in series
Damien De Paoli2023-07-01 16:12:36 +10:00
f8df4d1980
BUG-34: possible series list is assuming a NULL sub_book_num is taking up a slot of books in series
Damien De Paoli2023-07-01 16:09:08 +10:00
fa2d570612
reminder to fix for proper use of ORMs, we still see odd timeouts that go away with a browser refresh - presume its the mixing of ORM and not
Damien De Paoli2023-07-01 16:06:36 +10:00
672060399b
new bug-33, complex case of adding a book with sub-books to a second series (diamond throne -> Sparhawk series book 1)
Damien De Paoli2023-07-01 16:05:47 +10:00
cc37077504
fix use of ENV -> FLASK_ENV to have correct prod/dev markers in navbar
Damien De Paoli2023-07-01 16:05:06 +10:00
d4d37b96e3
fix dataTables ordering when I dont expect it to for books on shelf view
Damien De Paoli2023-07-01 15:11:00 +10:00
6a43cd23d1
about to test this in prod, but BUG-6 (finally) and BUG-32 are now fixed
Damien De Paoli2023-07-01 14:33:05 +10:00
6cef2e0d9c
converted over to bal from author, and fixed up the way sub books / series interact
Damien De Paoli2023-07-01 14:26:36 +10:00
bb3c08a871
BUG-27 is incorrect, maybe just fixed with using ORM from sql direct is my guess, but new book and series works in dev, so dropping bug
Damien De Paoli2023-06-13 22:08:34 +10:00
ae2453d073
fixed BUGS 28/29 -> can now have empty year_published, fixed up limits to 1850-2100 now too and better error messages. Also auto-change when choose wishlist
Damien De Paoli2023-06-13 18:53:03 +10:00
9e4ee74775
made explicit the difference between development and conatiner in wrapper (and docker-compose) so that we can run FLASK on port 5000 using db on localhost 55432. bookdb_webdev is a container, running on port 5001 and using bookdb_dev container on port 5432
Damien De Paoli2023-06-13 00:27:10 +10:00
ce58624834
new BUG, year_published needed even when on wish list
Damien De Paoli2023-06-12 21:27:14 +10:00
ff513e0add
added BUG-28, choosing on wish list does not alter other gui elements
Damien De Paoli2023-06-12 21:12:27 +10:00
f66ed36bfe
adding BUG-27 - creating book with series, and series not added
Damien De Paoli2023-06-12 21:01:42 +10:00
e36e9fd098
using --enable-stdio-inheritance for prod gunicorn too
Damien De Paoli2023-06-12 20:46:13 +10:00
668d4d994e
fixed BUG-26 (saving with a series), and added a bookdb_webdev container that maps ~/src/pybook to /pybook_mapped_volume. Then start a single threaded, reloading, output capturing gunicorn via wraper.sh if in DEV, otherwise normal gunicorn if in PROD - gives me an idnentical dev in a container to prod.
Damien De Paoli2023-06-12 20:44:28 +10:00
e92cfd448e
fixed BUG-26 (saving with a series), and added a bookdb_webdev container that maps ~/src/pybook to /pybook_mapped_volume. Then start a single threaded, reloading, output capturing gunicorn via wraper.sh if in DEV, otherwise normal gunicorn if in PROD - gives me an idnentical dev in a container to prod.
Damien De Paoli2023-06-12 20:43:45 +10:00
58d99d526e
BUG-26, cant save any change on a book with series
Damien De Paoli2023-06-12 20:40:48 +10:00
0ed2b79485
improve UX for add/remove subbooks - updates content to original page behind modal, when we add/remove and fix the broken close button on modal
Damien De Paoli2023-06-11 22:05:49 +10:00
66378766aa
fix BUG-25 by using ORM not db calls direct, could not see why they worked in DEV but not PROD with NO logs - only assume sqlachemy2 doesnt like the engine execute code I used instead
Damien De Paoli2023-06-11 21:48:01 +10:00
7b329d84fc
final books on shelf fix, start out by title, so books not in series are by title (and those in and out of series are by title until a series is reached, then its by series number until the series is finished, then back to title) - fixes BUG-24
Damien De Paoli2023-06-11 15:37:07 +10:00
48c2c564d3
final books on shelf fix, start out by title, so books not in series are by title (and those in and out of series are by title until a series is reached, then its by series number until the series is finished, then back to title)
Damien De Paoli2023-06-11 15:36:39 +10:00
9f5e9ff3c2
fix BUG-23 (subbook/series confusion), also remove warnings about sql alchemy overlaps, and had to fix bug I introduced when editing a book where the drop-downs no longer had content based on data in form, and stopped messing with books list when iterating over it, python != c :) so using another list called processed to know if the books do not need to be processed (again) - this finally fixed books on shelf
Damien De Paoli2023-06-11 14:22:08 +10:00
c23df4dac3
BUG-23: saving books with subs, somehow complains about series removal
Damien De Paoli2023-06-11 14:18:01 +10:00
88eb500c83
fix bug with series with 0 books in it, not showing up for use when editing a book
Damien De Paoli2023-06-11 14:17:29 +10:00
196f758372
fixed bug where when you remove a sub_book it left a whole in sub_book_num's, and rewrote to new sqlalchemy 2, all the direct sqls
Damien De Paoli2023-06-11 11:23:48 +10:00