The project is deployed at http://54.236.59.250/
IP addreess 54.236.59.250
Port 2200
Start a new Ubuntu Linux server instance on Amazon Lightsail. SSH into your server.
- Sudo adduser grader
- generate keys on local machine usingssh-keygen
- Then, execute the following commands: a. $ mkdir .ssh b. $ touch .ssh/authorized_keys c. $ sudo nano .ssh/authorized_keys -- Copy the public key generated on your local machine to this file and save d. chmod 700 .ssh e. $ chmod 644 .ssh/authorized_keys
- sudo nano /etc/ssh/sshd_config -- change Port 22 to Port 2200
- sudo service ssh restart
- sudo apt-get install apache2
- sudo apt-get install python-setuptools libapache2-mod-wsgi
- sudo service apache2 restart
6. sudo su – postgres
7. create a database and a user. Grant all priveleges to the user.
8. Exit from PSQL.
PostgreSQL from the Ubuntu repositories does not allow remote connections by default. You can check this at:
sudo nano /etc/postgresql/9.1/main/pg_hba.conf
9. sudo apt-get install git
10. cd /var/www
11. sudo mkdir FlaskApp
12. cd FlaskApp
13. sudo git clone https://github.com/saranvoleti/ItemCatalog_Linux.git
14. Rename the project's name to Flaskapp
15. Rename item_catalog.py to __init__.py using sudo mv item_catalog.py __init__.py
To Configure and Enable a New Virtual Host and to create a .wsgi file follow the instructions given in https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps https://www.digitalocean.com/community/tutorials/how-to-secure-postgresql-on-an-ubuntu-vps