Maiphuongthao / MaiPhuongThao_P13_2023

0 stars 0 forks source link

circleci

Menu

  1. General informations
  2. Prerequisite list
  3. Installation
  4. Develop the site locally
  5. Admin
  6. Production

General informations

Orange County Lettings is a start-up real estate company in the US. The but is to improve the base code from their github Python-OC-lettings_FR, then to the deployment. For more information, check out Read The Docs

Basic demands:

Technical aspects

Reduce several diver problems

Monitoring and tracking errors with Sentry

Pipeline CI/CD wtih CircleCI and deploy the project to AWS EC2 instance


Prerequisite list


Installation

Clone the repository

Create variable environnement and install the requirements

Windows :


    python -m venv env 
    env\scripts\activate

    pip install -r requirements.txt

MacOS et Linux :


    python3 -m venv env 
    source env/bin/activate

    pip install -r requirements.txt

Protect the secret informations


Develop the site locally

launch the site

Without docker

With docker

Have a look at the tests and tests'scoverage

Linting

Database


Admin


Production

Setup AWS EC2

Setup CircleCI/CD

Key Value
DOCKER_LOGIN Docker Hub Id
DOCKER_PASSWORD Docker Hub password
DEBUG False
SECRET_KEY Django secret key
SENTRY_DSN Sentry DSN
AWS_ACCESS_KEY_ID AWS access key id
AWS_SECRET_ACCESS_KEY AWS secret key of access key
AWS_DEFAULT_REGION aws default region
SG_ID sg of aws ec2 instance security group
SSH_HOST aws ec2 instance IP public or DNS public
SSH_USER aws ec2 instance user

Deployment

This project is using Trunk-base development as a version control management practice: one master branch, one development branch & Circleci pipeline

Here we have the website fully deployed to an ip public.