Giter VIP home page Giter VIP logo

django-cicd-oc's Introduction

Holiday Homes logo

Build Status Documentation Status

Preamble

This application was designed for a school project with specific requirements and fixed constraints (for example, the given database was sqlite). This project is not intended be perfect and to evolve that much once finished. For that reason, this project is not open to contribution.

This project aims to improve an existing code base (then test it, deploy it and document it). To achieve this, I started by forking the original repository. Therefore, the HTML templates, CSS code, models, and views are not originally written by me.

The following need is fictive.

Project context

Orange County Lettings is a start-up in the real estate rental industry with an online platform. The start-up is in the midst of an expansion phase and has decided to hire a new recruit: and here I am.

The company's main needs are as follows:

  • Splitting the existing application to make it more modular,
  • Adding a comprehensive testsuite,
  • Creating a CI/CD pipeline,
  • Tracking and monitoring logs and errors,
  • Documenting the application.

Documentation

A documentation of this project is available on ReadTheDocs.

The project design and technologies

Technologies

  • The online platform is made with the Django web framework.
  • Its data is stored in a relational database sqlite.
  • The Python testing framework used for that project is pytest, coupled with coverage.
  • The log messages inserted in the code and Django's errors messages are tracked and monitored by Sentry.
  • The chosen CI/CD platform to automate the build, test, and deployment is CircleCI.
  • Commits on master branch trigger build and push of a Docker image to the DockerHub registry.
  • The Docker image is then auto-deployed on the Render web service host.
  • The documentation is build with sphinx and deployed on ReadTheDocs.

More details

  • Read Development Guide to know more about the testing and the deployment process.
  • Read Internals to know more about technical aspects of the web application (models, URLs, etc.).

Quick-start

  1. git clone this repository:

    git clone https://github.com/nanakin/OC-P13-Django-CICD.git Django-CICD
    
  2. Move to the project directory:

    cd Django-CICD
    
  3. Install poetry (if not installed yet), by following the official documentation.

  4. Install project dependencies in a new virtual environment using poetry:

    poetry install
    
  5. Rename a .env.example file as .env:

    mv .env.example .env
    
  6. Edit the .env file to set the environment variables

  7. Apply database migrations:

    poetry run python manage.py migrate
    
  8. Collect static files (if your environment variable DEBUG is False):

    poetry run python manage.py collectstatic
    
  9. Run a development server locally:

    poetry run python manage.py runserver
    
  10. Open your browser and go to http://127.0.0.1:8000/ to see the application running.

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.