Skip to content

Commit

Permalink
Fix: startup and runtime (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Jan 28, 2025
2 parents 3c9658e + 4f5fb26 commit a3efa4d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion appcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ RUN pip install $(find /build/dist -name ca_disaster_recovery*.whl)

# configure container executable
ENTRYPOINT ["/bin/bash"]
CMD ["bin/reset_db.sh"]
CMD ["bin/start.sh"]
2 changes: 0 additions & 2 deletions bin/reset_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ if [[ -n "$valid_fixtures" ]]; then
else
echo "No JSON fixtures to load"
fi

bin/start.sh
2 changes: 1 addition & 1 deletion bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -eu

# initialize Django

bin/init.sh
bin/reset_db.sh

# start the web server

Expand Down
4 changes: 2 additions & 2 deletions web/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def RUNTIME_ENVIRONMENT():
# usage of django.conf.settings.ALLOWED_HOSTS here (rather than the module variable directly)
# is to ensure dynamic calculation, e.g. for unit tests and elsewhere this setting is needed
env = RUNTIME_ENVS.LOCAL
if "dev.disasterrecovery.ca.gov" in settings.ALLOWED_HOSTS:
if "dev" in settings.ALLOWED_HOSTS:
env = RUNTIME_ENVS.DEV
elif "test.disasterrecovery.ca.gov" in settings.ALLOWED_HOSTS:
elif "test" in settings.ALLOWED_HOSTS:
env = RUNTIME_ENVS.TEST
elif "disasterrecovery.ca.gov" in settings.ALLOWED_HOSTS:
env = RUNTIME_ENVS.PROD
Expand Down

0 comments on commit a3efa4d

Please sign in to comment.