Skip to content

Commit

Permalink
Merge pull request #4 from CodingVelocista/master
Browse files Browse the repository at this point in the history
Deployment Updates
  • Loading branch information
CodingVelocista authored Aug 21, 2019
2 parents e3409e1 + aecfe3a commit 82e5f3f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 10 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :

Expand Down
2 changes: 1 addition & 1 deletion app/backend/arm/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
17 changes: 12 additions & 5 deletions app/backend/conf/apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 <user>
SetEnv ARMDBPASS <password>
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

<Directory /usr/local/src/arm_working_directory>
Order deny,allow
Expand Down
15 changes: 11 additions & 4 deletions app/backend/conf/bc_apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 <user>
SetEnv ARMDBPASS <password>
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
Expand Down
5 changes: 5 additions & 0 deletions app/backend/prod_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# ./manage.py migrate
./manage.py collectstatic
./manage.py runserver 0.0.0.0:8000

0 comments on commit 82e5f3f

Please sign in to comment.