Skip to content

Commit

Permalink
add DJANGO_FORCE_SCRIPT_NAME env var to change Djangos FORCE_SCRIPT_N…
Browse files Browse the repository at this point in the history
…AME if needed, part of support for running TubeSync in a /suburi and not a domain root, resolves #18
  • Loading branch information
meeb committed Dec 19, 2020
1 parent b45231f commit 304cc15
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,15 @@ There are a number of other environment variables you can set. These are, mostly
**NOT** required to be set in the default container installation, they are really only
useful if you are manually installing TubeSync in some other environment. These are:

| Name | What | Example |
| ----------------- | ------------------------------------- | ---------------------------------- |
| DJANGO_SECRET_KEY | Django secret key | YJySXnQLB7UVZw2dXKDWxI5lEZaImK6l |
| TUBESYNC_DEBUG | Enable debugging | True |
| TUBESYNC_HOSTS | Django's ALLOWED_HOSTS | tubesync.example.com,otherhost.com |
| GUNICORN_WORKERS | Number of gunicorn workers to spawn | 3 |
| LISTEN_HOST | IP address for gunicorn to listen on | 127.0.0.1 |
| LISTEN_PORT | Port number for gunicorn to listen on | 8080 |
| Name | What | Example |
| ------------------------ | ------------------------------------- | ---------------------------------- |
| DJANGO_SECRET_KEY | Django's SECRET_KEY | YJySXnQLB7UVZw2dXKDWxI5lEZaImK6l |
| DJANGO_FORCE_SCRIPT_NAME | Django's FORCE_SCRIPT_NAME | /somepath |
| TUBESYNC_DEBUG | Enable debugging | True |
| TUBESYNC_HOSTS | Django's ALLOWED_HOSTS | tubesync.example.com,otherhost.com |
| GUNICORN_WORKERS | Number of gunicorn workers to spawn | 3 |
| LISTEN_HOST | IP address for gunicorn to listen on | 127.0.0.1 |
| LISTEN_PORT | Port number for gunicorn to listen on | 8080 |


# Manual, non-containerised, installation
Expand Down
1 change: 1 addition & 0 deletions tubesync/tubesync/local_settings.py.container
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ SECRET_KEY = str(os.getenv('DJANGO_SECRET_KEY', 'tubesync-django-secret'))
ALLOWED_HOSTS_STR = str(os.getenv('TUBESYNC_HOSTS', '127.0.0.1,localhost'))
ALLOWED_HOSTS = ALLOWED_HOSTS_STR.split(',')
DEBUG = True if os.getenv('TUBESYNC_DEBUG', False) else False
FORCE_SCRIPT_NAME = os.getenv('DJANGO_FORCE_SCRIPT_NAME', None)


TIME_ZONE = os.getenv('TZ', 'UTC')
Expand Down
1 change: 1 addition & 0 deletions tubesync/tubesync/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@


ROOT_URLCONF = 'tubesync.urls'
FORCE_SCRIPT_NAME = None


TEMPLATES = [
Expand Down

0 comments on commit 304cc15

Please sign in to comment.