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-MySQL extends Django's built-in MySQL and MariaDB support their specific features not available on other databases.

Django-MySQL The dolphin-pony - proof that cute + cute = double cute. Django-MySQL extends Django's built-in MySQL and MariaDB support their specific

Adam Johnson 504 Jan 04, 2023
The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango.

The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango. It requires a django-leaflet package.

Vsevolod Novikov 33 Nov 11, 2022
Strawberry-django-plus - Enhanced Strawberry GraphQL integration with Django

strawberry-django-plus Enhanced Strawberry integration with Django. Built on top

BLB Ventures 138 Dec 28, 2022
The best way to have DRY Django forms. The app provides a tag and filter that lets you quickly render forms in a div format while providing an enormous amount of capability to configure and control the rendered HTML.

django-crispy-forms The best way to have Django DRY forms. Build programmatic reusable layouts out of components, having full control of the rendered

4.6k Jan 07, 2023
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-discord-bot - Framework for creating Discord bots using Django

django-discord-bot Framework for creating Discord bots using Django Uses ASGI fo

Jamie Bliss 1 Mar 04, 2022
django-reversion is an extension to the Django web framework that provides version control for model instances.

django-reversion django-reversion is an extension to the Django web framework that provides version control for model instances. Requirements Python 3

Dave Hall 2.8k Jan 02, 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
A simple demonstration of how a django-based website can be set up for local development with microk8s

Django with MicroK8s Start Building Your Project This project provides a Django web app running as a single node Kubernetes cluster in microk8s. It is

Noah Jacobson 19 Oct 22, 2022
PEP-484 stubs for Django

pep484 stubs for Django This package contains type stubs and a custom mypy plugin to provide more precise static types and type inference for Django f

TypedDjango 1.1k Dec 30, 2022
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
demo project for django channels tutorial

django_channels_chat_official_tutorial demo project for django channels tutorial code from tutorial page: https://channels.readthedocs.io/en/stable/tu

lightsong 1 Oct 22, 2021
A package to handle images in django

Django Image Tools Django Image Tools is a small app that will allow you to manage your project's images without worrying much about image sizes, how

The Bonsai Studio 42 Jun 02, 2022
This is a basic Todo Application API using Django Rest Framework

Todo Application This is a basic Todo Application API using Django Rest Framework. Todo Section - User can View his previously added todo items, creat

Atharva Parkhe 1 Aug 09, 2022
Auto-detecting the n+1 queries problem in Python

nplusone nplusone is a library for detecting the n+1 queries problem in Python ORMs, including SQLAlchemy, Peewee, and the Django ORM. The Problem Man

Joshua Carp 837 Dec 29, 2022
A Powerful HTML white space remover for Django

HTML Whitespace remover for Django Introduction : A powerful tool to optimize Django rendered templates Why use "django_stip_whitespace" ? Adds line b

3 Jan 01, 2022
Simple application TodoList django with ReactJS

Django & React Django We basically follow the Django REST framework quickstart guide here. Create backend folder with a virtual Python environment: mk

Flavien HUGS 2 Aug 07, 2022
Store model history and view/revert changes from admin site.

django-simple-history django-simple-history stores Django model state on every create/update/delete. This app supports the following combinations of D

Jazzband 1.8k Jan 08, 2023
Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django.

django-minify-html Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django. Requirements Python 3.8 to 3.10 supported. Django 2.2 to

Adam Johnson 60 Dec 28, 2022
Built from scratch to replicate some of the Django admin functionality and add some more, to serve as an introspective interface for Django and Mongo.

django-mongonaut Info: An introspective interface for Django and MongoDB. Version: 0.2.21 Maintainer: Jazzband (jazzband.co) This Project is Being Mov

Jazzband 238 Dec 26, 2022