- Fix issue with CAPTCHA v3 (as of Novemeber 3rd).
- Fix issue with user registration saying username or email already exists (when it doesn't?).
Restore development environment for Python 2.7 on Ubuntu:
pip2 install -r requirements.txt
This will install all the same packages we used to develop the website and backend.
Gunicorn runs on the server at localhost:8080
with Nginx on top as a reverse-proxy, handling everything from port 80 (HTTP traffic).
The config for the Nginx server can be found in /etc/nginx/nginx.conf
and the service config for Gunicorn can be found under /etc/systemd/system/gunicorn.service
.
Our SSL certificates are obtained using Let's Encrypt are are auto-renewed every 90 days using a CRON job. This checks twice daily, and it's suggested to pick a random minute within the scheduled hour to renew on:
0 0,12 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' && ./path/to/certbot-auto renew
sudo ssh admin@airpacfire.eecs.wsu.edu # Password: airpact@fire#16
cd /home/admin/Website
No Logs
sudo gunicorn --bind 0.0.0.0:80 AIRPACT_Fire.wsgi:application # In the same directory as `manage.py`
Log to master_log file
sudo gunicorn --bind 0.0.0.0:80 --log-level debug --log-file master_log AIRPACT_Fire.wsgi:application
After you've committed your changes locally and pushed them to this repository
under the master
branch, do the following.
Kill the server with
ps -A # Find the process with the Gunicorn pid
sudo kill [pid] # Kill that process
Now move to the website directory with
cd /home/admin/Website
and then pull your changes down from GitHub via
git pull
At last you can start the server again
sudo gunicorn --bind 0.0.0.0:80 AIRPACT_Fire.wsgi:application
Run through the Updating Server Code section, but skip step 3.
Usage:
sudo ./log_script [log_file] [url_to_post]
or with nohup (so script doesn't die when server is off):
sudo nohup ./log_script [file] [url] &
Example:
sudo nohup ./log_script master_log https://hooks.slack.com/services/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 &
git clone https://github.com/AIRPACT-Fire/Website.git