Skip to content

Commit

Permalink
feat: make setup easier (#225)
Browse files Browse the repository at this point in the history
* feat: add run.sh and deploy.sh scripts for Director

* feat: add prod defaults to secret.sample.py
  • Loading branch information
krishnans2006 committed Feb 10, 2024
1 parent c39fdc7 commit d52e0f7
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

cd /site/public
git pull
TMPDIR=/site/tmp pipenv sync
pipenv run ./manage.py migrate
pipenv run ./manage.py collectstatic --no-input
echo "Deploy complete. Restart the site process to wrap up."
3 changes: 3 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

pipenv run gunicorn -b $HOST:$PORT --workers 4 tjdests.wsgi
25 changes: 25 additions & 0 deletions tjdests/settings/secret.sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,34 @@
SOCIAL_AUTH_ION_KEY = "ionkey"
SOCIAL_AUTH_ION_SECRET = "ionsecret"

# Database
# DATABASES = {
# "default": {
# "ENGINE": "django.db.backends.postgresql",
# "NAME": os.environ["DIRECTOR_DATABASE_NAME"],
# "USER": os.environ["DIRECTOR_DATABASE_USERNAME"],
# "PASSWORD": os.environ["DIRECTOR_DATABASE_PASSWORD"],
# "HOST": os.environ["DIRECTOR_DATABASE_HOST"],
# "PORT": os.environ["DIRECTOR_DATABASE_PORT"],
# },
# }

# Axes
# AXES_META_PRECEDENCE_ORDER = [
# 'HTTP_X_REAL_IP',
# ]
# AXES_NEVER_LOCKOUT_WHITELIST = True
# AXES_IP_WHITELIST = ["151.188.227.237"]

# Message blast - treated as HTML safe text
# type is str
GLOBAL_MESSAGE = None
# GLOBAL_MESSAGE = "<b>WARNING</b>: This is not ready for production usage! Any and all data may be deleted at any time without warning!"

# Login lock: if True, restrict login to superusers only
LOGIN_LOCKED = False

TIME_ZONE = "America/New_York"

# To prevent Git issues
MAINTAINER = "First Last (20XXusername)"

0 comments on commit d52e0f7

Please sign in to comment.