Skip to content

Instantly share code, notes, and snippets.

@ejokeeffe
Last active December 20, 2016 09:27
Show Gist options
  • Save ejokeeffe/48d69b6ee49cc7adc210a313aa8fbe10 to your computer and use it in GitHub Desktop.
Save ejokeeffe/48d69b6ee49cc7adc210a313aa8fbe10 to your computer and use it in GitHub Desktop.
Set up django on aws server.

Set up the AWS Instance Launch AWS instance under a security group with HTTP (port 80) and (port 22)ssh access. Additionally, as you'll likely be running a test site using django - open up the 8000 port.

Update the installer, sudo yum update -y.

Install python using miniconda following these instructions. Create the environment, also installing pip, conda env create -n django --yes python=3.5 pip and activate it source activate django.

Set up the database I tend to set up a separate postgres instance in in RDS, rather than install on the instance. Go go to RDS on AWS and click Launch DB Instance selecting postgres.

Set up Django Now we start setting up Django:

pip install Django

UI Development I tend to use Semantic UI, so you'll need to follow install nodejs (you might need to change the version of nodejs). You need to run as root, or you will get a permission error.

sudo curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - sudo yum install -y nodejs

Once that is installed, you can then use npm to install things. First up is Gulp:

sudo npm install -g gulp

Then follow instructions to set up Semantic UI in the project folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment