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-Audiofield is a simple app that allows Audio files upload, management and conversion to different audio format (mp3, wav & ogg), which also makes it easy to play audio files into your Django application.

Django-Audiofield Description: Django Audio Management Tools Maintainer: Areski Contributors: list of contributors Django-Audiofield is a simple app t

Areski Belaid 167 Nov 10, 2022
Easily share data across your company via SQL queries. From Grove Collab.

SQL Explorer SQL Explorer aims to make the flow of data between people fast, simple, and confusion-free. It is a Django-based application that you can

Grove Collaborative 2.1k Dec 30, 2022
Dynamic Django settings.

Constance - Dynamic Django settings A Django app for storing dynamic settings in pluggable backends (Redis and Django model backend built in) with an

Jazzband 1.5k Jan 07, 2023
A prettier way to see Django requests while developing

A prettier way to see Django requests while developing

Adam Hill 35 Dec 02, 2022
Py-instant-search-redis - Source code example for how to build an instant search with redis in python

py-instant-search-redis Source code example for how to build an instant search (

Giap Le 4 Feb 17, 2022
A Django app for working with BTCPayServer

btcpay-django A Django app for working with BTCPayServer Installation pip install btcpay-django Developers Release To cut a release, run bumpversion,

Crawford 3 Nov 20, 2022
Simple reproduction of connection leak with celery/django/gevent

Redis connection leak with celery/django/gevent Reproduces celery issue at https://github.com/celery/celery/issues/6819 using gevented django web serv

2 Apr 03, 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
xsendfile etc wrapper

Django Sendfile This is a wrapper around web-server specific methods for sending files to web clients. This is useful when Django needs to check permi

John Montgomery 476 Dec 01, 2022
Django Federated Login provides an authentication bridge between Django projects and OpenID-enabled identity providers.

Django Federated Login Django Federated Login provides an authentication bridge between Django projects and OpenID-enabled identity providers. The bri

Bouke Haarsma 18 Dec 29, 2020
This website serves as an online database (hosted via SQLLite) for fictional businesses in the area to store contact information (name, email, phone number, etc.) for fictional customers.

Django-Online-Business-Database-Project this project is still in progress Overview of Website This website serves as an online database (hosted via SQ

1 Oct 30, 2021
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
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

Cookiecutter Django Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. Documentati

10.1k Jan 08, 2023
django CMS Association 1.6k Jan 06, 2023
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 07, 2023
Django project starter on steroids: quickly create a Django app AND generate source code for data models + REST/GraphQL APIs (the generated code is auto-linted and has 100% test coverage).

Create Django App πŸ’› We're a Django project starter on steroids! One-line command to create a Django app with all the dependencies auto-installed AND

imagine.ai 68 Oct 19, 2022
Utility for working with recurring dates in Django.

django-recurrence django-recurrence is a utility for working with recurring dates in Django. Documentation is available at https://django-recurrence.r

408 Jan 06, 2023
Django Persistent Filters is a Python package which provide a django middleware that take care to persist the querystring in the browser cookies.

Django Persistent Filters Django Persistent Filters is a Python package which provide a django middleware that take care to persist the querystring in

Lorenzo Prodon 2 Aug 05, 2022
A Django web application that allows you to be in the loop about everything happening in your neighborhood.

A Django web application that allows you to be in the loop about everything happening in your neighborhood. From contact information of different handyman to meeting announcements or even alerts.

Kennedy Ngugi Mwaura 3 Dec 11, 2022
Integarting Celery with Django to asynchronous tasks πŸ“ƒ

Integrating πŸ”— Celery with Django via Redis server ,To-Do asynchronously πŸ‘€task without stopping the main-flow πŸ“ƒ of Django-project . It increase your speed πŸš€ and user experience 🀡 of website

Rushi Patel 4 Jul 15, 2022