django-dropzone-to-s3

A simple Django application that uploads files directly to an Amazon S3 bucket.

Stars
7

Django Dropzone to S3

A simple Django application that file uploads directly to an Amazon S3 bucket.

Basic Deployment

The following deployment setup is only meant as an example for those wishing to quickly deploy this application to a web server without necessarily understanding the code.

You'll need the following installed before cloning the source code:

You'll need to setup the following Amazon Web Services (AWS):

  • Launch an EC2 instance running Ubuntu Server (or some other Debian-based operating system)
  • Save the .pem key pair file for the EC2 instance as ~/.ssh/myserver.pem
  • Create an EC2 Security Group that has port 80 opened
  • Create an S3 bucket.
  • Generate an AWS Access Key and Secret Access Key
  • (Optional) Create an elastic IP and associate it with the EC2 instace you created
  • (Optional) Create a DNS entry of your choosing to point to the elastic IP (AWS will generate their own DNS entry that you can also use, if you don't have your own domain name)

Now you're ready to checkout, configure, and deploy the code to your EC2 server.

  • Fork the repository on GitHub
  • Clone your forked repository
  • Modify the variables at the bottom of djangodropzonetos3/settings.py to customize the application
  • You must specify valid values for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_STORAGE_BUCKET_NAME in settings.py
  • Modify the HOSTNAME variables at the top of fabfile.py to point to your EC2 instance's DNS entry
  • Modify the REPO_URL variable at the top of fabfile.py to point to your fork of the repository
  • From the Command Line at the root of the cloned source, execute "pip install -r reqs.txt"
  • From the Command Line at the root of the cloned source, execute "fab deploy"
Related Projects