mirror of
https://github.com/ajurna/cbwebreader.git
synced 2025-12-06 06:17:17 +00:00
Dotenv (#28)
* docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes * docker-compose.yml fixes
This commit is contained in:
35
.env.docker
Normal file
35
.env.docker
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Set this or it won't work.
|
||||||
|
DJANGO_SECRET_KEY=
|
||||||
|
|
||||||
|
DJANGO_DEBUG=False
|
||||||
|
|
||||||
|
#set this to the hostname of your server.
|
||||||
|
DJANGO_ALLOWED_HOSTS=localhost
|
||||||
|
|
||||||
|
DB_USER=admin
|
||||||
|
# Please set a better password
|
||||||
|
DB_PASS=password
|
||||||
|
DB_HOST=database
|
||||||
|
DB_DATABASE=cbwebreader
|
||||||
|
|
||||||
|
# https://github.com/jacobian/dj-database-url
|
||||||
|
DATABASE_URL=postgres://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_DATABASE}
|
||||||
|
|
||||||
|
#Path to your comics.
|
||||||
|
COMIC_BOOK_VOLUME=/media/plex/comics
|
||||||
|
|
||||||
|
STATIC_ROOT='/static'
|
||||||
|
|
||||||
|
MEDIA_ROOT='/media'
|
||||||
|
|
||||||
|
# This expects the office winrar unrar command line tool for windows or linux.
|
||||||
|
# Will work without setting if it is in the path
|
||||||
|
# UNRAR_TOOL = 'unrar.exe'
|
||||||
|
|
||||||
|
# for google recaptcha 2
|
||||||
|
# DJANGO_CBREADER_USE_RECAPTCHA = True
|
||||||
|
# DJANGO_RECAPTCHA_PRIVATE_KEY = ''
|
||||||
|
# DJANGO_RECAPTCHA_PUBLIC_KEY = ''
|
||||||
|
|
||||||
|
# Comment the following if not using a reverse proxy.
|
||||||
|
USE_X_FORWARDED_HOST=True
|
||||||
@@ -7,7 +7,7 @@ DJANGO_DEBUG=False
|
|||||||
DJANGO_ALLOWED_HOSTS='localhost'
|
DJANGO_ALLOWED_HOSTS='localhost'
|
||||||
|
|
||||||
DB_USER=admin
|
DB_USER=admin
|
||||||
#Please set a better password
|
# Please set a better password
|
||||||
DB_PASS=password
|
DB_PASS=password
|
||||||
DB_HOST=database
|
DB_HOST=database
|
||||||
DB_DATABASE=cbwebreader
|
DB_DATABASE=cbwebreader
|
||||||
@@ -15,12 +15,14 @@ DB_DATABASE=cbwebreader
|
|||||||
# https://github.com/jacobian/dj-database-url
|
# https://github.com/jacobian/dj-database-url
|
||||||
DATABASE_URL='postgres://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_DATABASE}'
|
DATABASE_URL='postgres://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_DATABASE}'
|
||||||
|
|
||||||
#Path to your comics.
|
# Path to your comics.
|
||||||
COMIC_BOOK_VOLUME=/path/to/comic/folder
|
COMIC_BOOK_VOLUME=/path/to/comic/folder
|
||||||
|
|
||||||
|
# Usually fine tp leave as is.
|
||||||
STATIC_ROOT=/static
|
STATIC_ROOT=/static
|
||||||
|
|
||||||
MEDIA_ROOT='./media'
|
# The path where you want to store the Thumbnail files
|
||||||
|
MEDIA_ROOT='/media'
|
||||||
|
|
||||||
# This expects the office winrar unrar command line tool for windows or linux.
|
# This expects the office winrar unrar command line tool for windows or linux.
|
||||||
# Will work without setting if it is in the path
|
# Will work without setting if it is in the path
|
||||||
|
|||||||
@@ -11,8 +11,7 @@ from dotenv import load_dotenv
|
|||||||
|
|
||||||
BASE_DIR = Path(__file__).parent.parent.parent
|
BASE_DIR = Path(__file__).parent.parent.parent
|
||||||
|
|
||||||
if os.environ.get("DJANGO_SECRET_KEY", False):
|
load_dotenv(override=True)
|
||||||
load_dotenv(Path(BASE_DIR, '.env'))
|
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ services:
|
|||||||
expose:
|
expose:
|
||||||
- 8000
|
- 8000
|
||||||
volumes:
|
volumes:
|
||||||
- ${COMIC_BOOK_VOLUME}:/data
|
- ${COMIC_BOOK_VOLUME}:${COMIC_BOOK_VOLUME}
|
||||||
- static_files:/static
|
- static_files:/static
|
||||||
- media_files:/media
|
- media_files:/media
|
||||||
|
- .env:/src/.env
|
||||||
command: /bin/bash entrypoint.sh
|
command: /bin/bash entrypoint.sh
|
||||||
|
|
||||||
cbwebreader-cron:
|
cbwebreader-cron:
|
||||||
@@ -25,7 +26,9 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
volumes:
|
volumes:
|
||||||
- ${COMIC_BOOK_VOLUME}:/data
|
- ${COMIC_BOOK_VOLUME}:${COMIC_BOOK_VOLUME}
|
||||||
|
- media_files:/media
|
||||||
|
- .env:/src/.env
|
||||||
command: /bin/bash entrypoint-cron.sh
|
command: /bin/bash entrypoint-cron.sh
|
||||||
|
|
||||||
database:
|
database:
|
||||||
|
|||||||
Reference in New Issue
Block a user