diff --git a/README.md b/README.md index 6c4dc59..3d3f400 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,16 @@ ERROR: django-timezone-field 3.0 has requirement django>=1.8, but you'll have dj So `Django==1.8` is a more appropriate starting point. +### Post Upgrade to Python 3.7 and Django 2.2.4 + +### Requirements +Django==2.2.4 +django-extensions +python-dateutil +django-timezone-field +pygments +psycopg2 + ### Apache Configuration In terms of codebase, there appears to be a common codebase that serves out the Whatcom and the BC version of the app. The legacy app already had a 'BC-specific' side to the app : diff --git a/app/backend/arm/settings.py b/app/backend/arm/settings.py index a762456..fc705fd 100755 --- a/app/backend/arm/settings.py +++ b/app/backend/arm/settings.py @@ -17,7 +17,7 @@ ('Admin', ADMIN_EMAIL), ) -ALLOWED_HOSTS = [ 'localhost', '127.0.0.1', socket.gethostname() ] +ALLOWED_HOSTS = [ 'localhost', '127.0.0.1', socket.gethostname(), 'arm-orig.azurewebsites.net' ] AUTH_USER_MODEL = 'admins.Admin' diff --git a/app/backend/conf/apache.conf b/app/backend/conf/apache.conf index 8ff6c5d..1c52aa0 100755 --- a/app/backend/conf/apache.conf +++ b/app/backend/conf/apache.conf @@ -26,15 +26,22 @@ Alias /static/ /usr/local/src/arm_working_directory/static/ #Alias /media/ /usr/local/src/arm_working_directory/media/ - SetEnv ENVIRONMENT greg - SetEnv ARMDBNAME arm - SetEnv ARMDBUSER - SetEnv ARMDBPASS + SetEnv ENVIRONMENT dev + SetEnv DEBUG: 'False' + SetEnv LOGGER_LEVEL: WARNING + SetEnv ADMIN_EMAIL: admin.email@domain + SetEnv DATABASE_NAME: DATABASE_NAME + SetEnv DATABASE_USER: DATABASE_USER + SetEnv DATABASE_PASSWORD: DATABASE_PASSWORD + SetEnv DEFAULT_FROM_EMAIL: admin.email@domain + SetEnv EMAIL_TO: admin.email@domain + SetEnv SERVER_EMAIL: admin.email@domain + SetEnv SUPPORT_EMAIL: admin.email@domain WSGIDaemonProcess arm_tasks user=user group=www-data threads=10 processes=10 display-name="mod_arm_tasks" maximum-requests=250 python-path=/usr/local/src/arm_working_directory:/usr/local/src/arm_working_directory/venv/pyvenv/lib/python2.6/site-packages WSGIProcessGroup arm_tasks - WSGIScriptAlias / /usr/local/src/arm_working_directory/arm/settings_overrides/wsgi.py + WSGIScriptAlias / /usr/local/src/arm_working_directory/arm/wsgi.py Order deny,allow diff --git a/app/backend/conf/bc_apache.conf b/app/backend/conf/bc_apache.conf index 45273ba..0614ada 100755 --- a/app/backend/conf/bc_apache.conf +++ b/app/backend/conf/bc_apache.conf @@ -26,10 +26,17 @@ Alias /static/ /usr/local/src/bc_arm_working_directory/static/ #Alias /media/ /usr/local/src/bc_arm_working_directory/media/ - SetEnv ENVIRONMENT greg - SetEnv ARMDBNAME arm - SetEnv ARMDBUSER - SetEnv ARMDBPASS + SetEnv ENVIRONMENT dev + SetEnv DEBUG: 'False' + SetEnv LOGGER_LEVEL: WARNING + SetEnv ADMIN_EMAIL: admin.email@domain + SetEnv DATABASE_NAME: DATABASE_NAME + SetEnv DATABASE_USER: DATABASE_USER + SetEnv DATABASE_PASSWORD: DATABASE_PASSWORD + SetEnv DEFAULT_FROM_EMAIL: admin.email@domain + SetEnv EMAIL_TO: admin.email@domain + SetEnv SERVER_EMAIL: admin.email@domain + SetEnv SUPPORT_EMAIL: admin.email@domain WSGIDaemonProcess bc_arm_tasks user=user group=www-data threads=10 processes=10 display-name="mod_arm_tasks" maximum-requests=250 python-path=/usr/local/src/bc_arm_working_directory:/usr/local/src/bc_arm_working_directory/venv/pyvenv/lib/python2.6/site-packages WSGIProcessGroup bc_arm_tasks diff --git a/app/backend/prod_run.sh b/app/backend/prod_run.sh new file mode 100644 index 0000000..4ca19d4 --- /dev/null +++ b/app/backend/prod_run.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# ./manage.py migrate +./manage.py collectstatic +./manage.py runserver 0.0.0.0:8000 \ No newline at end of file