Giter VIP home page Giter VIP logo

aws-eb-docker-django's Introduction

README

This README document an example for how to setup a Docker based Elastic Beanstalk (EB) running a Django Project with a Postgres RDS instance

This version uses the Generic Docker Platform in EB

How do I get set up?

  • install Python 3.4

  • install git

  • install pip

  • install virtualenv

  • make virtualenv

  • pip install -r requirements.txt

  • pip install -r local_requirements.txt

Local Setup (Fabric)

  • As indicated, you must first install python 2.7/3.4, git, pip and virtualenv

  • fab statics

    • to collect statics
  • fab test

    • to run unit tests
  • fab migrate

    • To makemigrations and migrate database
  • fab runserver

    • To run local server
  • fab eb_create

    • To deploy initial setup to AWS Elastic Beanstalk
  • fab eb_deploy

    • To deploy code changes to an existing image (previously created)

Local Setup (Docker compose)

Assuming you install docker-compose (https://docs.docker.com/compose/)

  • docker-compose up -d
  • docker-compose build web // To rebuild django server after changes
  • docker-compose run --rm web python manage.py migrate
  • docker-compose run --rm web python manage.py initadmin
  • docker-compose run --rm web python manage.py test --settings=settings.dev-local

AWS Elastic Beanstalk Release

Assuming credentials stored on ~/.aws/credentials (http://boto.readthedocs.org/en/latest/boto_config_tut.html)

  • export AWS_PROFILE='your-profile-name'
  • export EB_ENV_NAME='elastic-beanstalk-environment-and-app-name' (we are using env==app names)
  • fab eb_create_preconfigured
    • Enter db name and password
    • It can take as much as ten minutes to finish
  • After the site is up, go to the following address to initialize the admin account
    • http://.elasticbeanstalk.com/account/init
    • Then login and change the password

References

aws-eb-docker-django's People

Contributors

dkarchmer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.