Deployment - TheRadRabbidRabbit/Team-Lovelace GitHub Wiki

Steps to Deploy Website

  1. Create Public Domain through use of Github or Freenom

  2. Link AWS account to SSH and create an instance through EC2

  3. Download Linux terminal (ubuntu) and configure it to SSH to run through AWS

  4. Make sure files are updated and install other files

  5. Build Gunicorn configuration file, test and run [Unit] Description=Gunicorn instance to serve homesite web project After=network.target

[Service] User=pi Group=www-data WorkingDirectory=/home/ubuntu/Team-Lovelace Environment="PATH=/home/ubuntu/Team-Lovelace/homesite/bin" ExecStart=/home/ubuntu/Team-Lovelace/homesite/bin/gunicorn --workers 3 --bind unix:homesite.sock -m 007 main:app

[Install] WantedBy=multi-user.target

  1. Build Nginx configuration file, test and run server { listen 80; listen [::]:80; server_name collegeboardcsp.tk;

    location / { include proxy_params; proxy_pass http://unix:/home/ubuntu/Team-Lovelace/homesite.sock; } }

  2. Verify virtual environment and package dependency

  3. Validate Nginx and Gunicorn files, run service permanently

  4. Port forward web application to internal host and run permanently

Hardware

  • Using Amazon Web Services (AWS)

Frequency

  • Update website every week (at least) for review day

Backup

In case deployment manager is busy or unavailable: