Orange County Lettings is a small Django App deployed on Heroku and using a CI/CD Pipeline.
- Python
- Django
- Docker
- CircleCI
- Heroku
- Sentry
git clone https://github.com/Jliezed/oc_project_13_orange.git
Install venv library (if not yet in your computer)
pip install venv
Create a virtual environment
python -m venv env
Activate the virtual environment
source env/bin/activate
pip install -r requirements.txt
python manage.py runserver
Go to http://127.0.0.0:8000/ to access the app
Go to http://127.0.0.0:8000/admin/ to access the admin panel (user: admin
, password: Abc1234!
)
docker build -t oc_project_13_orange .
docker run -p 8000:8000 oc_project_13_orange
Go to http://localhost:8000/ to access the app
Go to http://localhost:8000/admin/ to access the admin panel (user: admin
, password: Abc1234!
)
flake8
python manage.py test
Define in the .circleci/config.yml
file the steps to be executed by CircleCI when a new commit is pushed to the repository.
- Install pip
- Install requirements
- If the installation fails, the build is stopped
- If the installation passes, the build continues
- Run Flake8 to check the code quality
- If Flake8 fails, the build is stopped
- If Flake8 passes, the build continues
- Run tests
- If tests fail, the build is stopped
- If tests pass, the build continues
- Tests results are saved in CircleCI
- Build the Docker image
- If the build fails, the build is stopped
- If the build passes, the build continues
- The image is tagged with the commit SHA
- The image is pushed to Docker Hub
- Required:
- Pip & Requirements passed
- Linting passed
- Testing passed
- Only on branch: Master
- Deploy the Docker image to Heroku
- If the deployment fails, the build is stopped
- If the deployment passes, the build ends
- Required:
- Build Docker Image passed