Skip to content

8area8/p10__Django-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pur Beurre deployment

version version version

News

  • 06/01/2019 : release 1.0 done. All features are implemented.

Presentation

Pur Beurre app example

This project aims to deploy an online application, without the need for simplified cloud services patches.

Specificities

  • main server on AWS EC2
  • database on AWS RDS
  • set up with Docker and Docker-compose
  • deployment of Celery and Redis as services
  • use of a cron service for weekly tasks
  • use of travis for continuous deployment
  • use of sentry for efficient log management
  • use of Gunicorn and Nginx for HTTP communication

Getting Started

You can clone this repository to your local drive.
This project uses a submodule that contains the application. Make sure to import the submodule by executing the code below, from the root of the project :

git submodule update --remote --merge

Prerequisites

to use it, you'll need:

  • docker
  • an AWS account
  • a Sentry account
  • a Travis account

Installing

Install docker and docker-compose. Create your own database. Finally, create your .env in the root (see the part : "setting configuration").

Local testing

Simply run :

docker-compose up

Settings configurations

# .env file

DATABASE_NAME=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
DATABASE_PORT=
REDIS_PORT=

PERSONAL_PASSWORD=

GOOGLE_KEY=
GOOGLE_PASS=

SENTRY_DNS=

Running the tests

Thanks to Travis, tests are automatically launched with each push to your Github account. You can still run them manually from the "django_app" container, when it is running.

Deployment

Thanks to docker, the deployment is relatively simple. The deployment is done in the same way as locally. Follow the same process locally to deploy your application.

Authors

Mikael Briolet - Initial work - OpenClassroom

License

MIT license.