mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Added whitenoise to serve static files
This commit is contained in:
@@ -13,7 +13,7 @@ services:
|
||||
pyshelf:
|
||||
image: "pyshelf/pyshelf"
|
||||
ports:
|
||||
- "8080:8000"
|
||||
- "8000:8000"
|
||||
- "1337:1337"
|
||||
volumes:
|
||||
- "${LOCAL_BOOK_DIR}:/books"
|
||||
|
||||
3
docker/Dockerfile
vendored
3
docker/Dockerfile
vendored
@@ -24,4 +24,5 @@ WORKDIR /pyshelf/
|
||||
RUN python3 -m pip install -r requirements.txt
|
||||
|
||||
ENTRYPOINT python3 configure \
|
||||
daphne --root-path=/pyshelf/src/interface frontend.asgi:application
|
||||
&& cd src/ \
|
||||
&& daphne -b 0.0.0.0 -p 8000 frontend.asgi:application
|
||||
|
||||
@@ -25,3 +25,4 @@ loguru
|
||||
ptvsd
|
||||
pudb
|
||||
daphne
|
||||
whitenoise
|
||||
|
||||
@@ -55,6 +55,7 @@ INSTALLED_APPS = [
|
||||
AUTH_USER_MODEL = "interface.User"
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
|
||||
Reference in New Issue
Block a user