Django StatusPage - App to display statuspage for your services

Related tags

Djangohacktoberfest
Overview

Django StatusPage

Its page what will check your services is online or not

Setup

python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver

After that start

python manage.py check_status

There are executed all checks of services. It should run if you want check services status.

Testing

flake8
pytest --cov --cov-report html
python manage.py test

Setup with nginx

pip install gunicorn psycopg2
sudo nano /etc/systemd/system/gunicorn_statuspage.service
[Unit]
Description=gunicorn_statuspage daemon
After=network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/django-statuspage
# EnvironmentFile=/var/www/django-statuspage/.env
ExecStart=/var/www/django-statuspage/.venv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/var/www/django-statuspage/djstatuspage.sock djstatuspage.wsgi:application

[Install]
WantedBy=multi-user.target

sudo systemctl start gunicorn_statuspage
sudo systemctl enable gunicorn_statuspage
sudo systemctl status gunicorn_statuspage
# If error check djstatuspage.sock permissions, maybe it cant create
chown www-data:www-data /var/www/django-statuspage
sudo systemctl restart gunicorn_statuspage

Ngnix config

server {
    listen 80;
    server_name status.domain.com;

    gzip on;
    error_log /var/log/nginx/status_error.log warn;
    access_log /var/log/nginx/status_access.log;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        alias /var/www/django-statuspage/staticfiles/; # ending slash is required
    }
    location /media/ {
        alias /var/www/django-statuspage/media/; # ending slash is required
    }
    location / {
        include proxy_params;
        proxy_pass http://unix:/var/www/django-statuspage/djstatuspage.sock;
    }
}
sudo ln -s /etc/nginx/sites-available/myproject /etc/nginx/sites-enabled
sudo nano /etc/systemd/system/statuspage.service
[Unit]
Description=StatusPage service
After=multi-user.target

[Service]
Type=simple
Restart=always
ExecStart=/var/www/django-statuspage/.venv/bin/python /var/www/django-statuspage/manage.py check_status

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start statuspage
sudo systemctl enable statuspage
Owner
Gorlik
Python Django Student Junior / Mid Developer
Gorlik
Django channels basic chat

Django channels basic chat

Dennis Ivy 41 Dec 24, 2022
Generate generic activity streams from the actions on your site. Users can follow any actors' activities for personalized streams.

Django Activity Stream What is Django Activity Stream? Django Activity Stream is a way of creating activities generated by the actions on your site. I

Justin Quick 2.1k Dec 29, 2022
Django Pickled Model

Django Pickled Model Django pickled model provides you a model with dynamic data types. a field can store any value in any type. You can store Integer

Amir 3 Sep 14, 2022
Customize the behavior of django.contrib.auth permissions.

Customizando o comportamento do django.contrib.auth. O que queremos? Não criar as permissões padrões automaticamente (add, delete, view, read). Criar

Henrique Bastos 7 Nov 26, 2022
An API was build with Django to store and retrieve information about various musical instruments.

The project is meant to be a starting point, an experimentation or a basic example of a way to develop an API with Django. It is an exercise on using Django and various python technologies and design

Kostas Ziovas 2 Dec 25, 2021
A django model and form field for normalised phone numbers using python-phonenumbers

django-phonenumber-field A Django library which interfaces with python-phonenumbers to validate, pretty print and convert phone numbers. python-phonen

Stefan Foulis 1.3k Dec 31, 2022
scaffold django rest apis like a champion 🚀

dr_scaffold Scaffold django rest apis like a champion ⚡ . said no one before Overview This library will help you to scaffold full Restful API Resource

Abdenasser Elidrissi 133 Jan 05, 2023
Book search Django web project that uses requests python library and openlibrary API.

Book Search API Developer: Vladimir Vojtenko Book search Django web project that uses requests python library and openlibrary API. #requests #openlibr

1 Dec 08, 2021
Redia Cache implementation in django.

django-redis Recipe APP Simple Recipe app which shows different kinds off recipe to the user. Why Cache ? Accessing data from cache is much faster tha

Avinash Alanjkar 1 Sep 21, 2022
Django CacheMiddleware has a multi-threading issue with pylibmc

django-pylibmc-bug Django CacheMiddleware has a multi-threading issue with pylibmc. CacheMiddleware shares a thread-unsafe cache object with many thre

Iuri de Silvio 1 Oct 19, 2022
Bootstrap 3 integration with Django.

django-bootstrap3 Bootstrap 3 integration for Django. Goal The goal of this project is to seamlessly blend Django and Bootstrap 3. Want to use Bootstr

Zostera B.V. 2.3k Jan 02, 2023
Logan is a toolkit for building standalone Django applications

Logan Logan is a toolkit for running standalone Django applications. It provides you with tools to create a CLI runner, manage settings, and the abili

David Cramer 206 Jan 03, 2023
The new Python SDK for Sentry.io

Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoy

Sentry 1.4k Jan 05, 2023
Django-static-site - A simple content site framework that harnesses the power of Django without the hassle

coltrane A simple content site framework that harnesses the power of Django with

Adam Hill 57 Dec 06, 2022
Median and percentile for Django and MongoEngine

Tailslide Median and percentile for Django and MongoEngine Supports: PostgreSQL SQLite MariaDB MySQL (with an extension) SQL Server MongoDB 🔥 Uses na

Andrew Kane 4 Jan 15, 2022
django app that allows capture application metrics by each user individually

Django User Metrics django app that allows capture application metrics by each user individually, so after you can generate reports with aggregation o

Reiner Marquez 42 Apr 28, 2022
This repository contains django library management system project.

Library Management System Django ** INSTALLATION** First of all install python on your system. Then run pip install -r requirements.txt to required se

whoisdinanath 1 Dec 26, 2022
Strict separation of config from code.

Python Decouple: Strict separation of settings from code Decouple helps you to organize your settings so that you can change parameters without having

Henrique Bastos 2.3k Jan 04, 2023
A simple polling app made in Django and Bootstrap

DjangoPolls A Simple Polling app made with Django Instructions Make sure you have Python installed Step 1. Open a terminal Step 2. Paste the given cod

Aditya Priyadarshi 1 Nov 10, 2021
Modular search for Django

Haystack Author: Daniel Lindsley Date: 2013/07/28 Haystack provides modular search for Django. It features a unified, familiar API that allows you to

Haystack Search 3.4k Jan 08, 2023