-
Notifications
You must be signed in to change notification settings - Fork 1
Setting Up MicSense Website
-
Create a PythonAnywhere account, if you don't have one yet!
-
Once you are logged in, create a web app.
a. Select No Template, and then select Python 3.5.
b. Click Finish to create your web app!
-
Now open a Bash console.
-
Create a SSH key for your PythonAnywhere environment!
a. Follow these AMAZING instructions! Instead of setting a passphrase, just press ENTER to leave it blank. Finally, skip the
ssh-agentstep - you don't need it!b. Run this command and copy the output:
cat ~/.ssh/id_rsa.pubc. Go here to add your SSH key. Paste the output you got into the giant box, give your key a good name (hint: "PythonAnywhere key"), tick the Write Access checkbox, and then click add.
-
Download the Git repo! Make sure you are in your home directory by running
cd, then run this command:git clone git@github.com:TerpDAC/MicrophoneControllerCode.git -
Now, go to your PythonAnywhere Database manager, and add a password to your MySQL database.
-
Once everything is set up, you should now see a few fields: the host name and the username. We also know our password. You can access this information by simply going to the Database tab.
-
Now, create a new database. Note that all databases will start with
USERNAME$, since that helps keep things organized for PythonAnywhere. Call this databasemicsense- and your resulting database will beUSERNAME$micsense. -
Within your
SensorWebsite/MicSensefolder, create a new folder called instance. Then, within that folder, add a new file called config.py. Add the following lines to it:# This should NEVER be uploaded to version control # FULL_DATABASE_NAME - this should include your username, e.g. USERNAME$db_name SQLALCHEMY_DATABASE_URI = "mysql+pymysql://USERNAME:PASSWORD@HOSTNAME/FULL_DATABASE_NAME"
-
Set your source code directory to ....
-
Set your Virtualenv directory to....