Skip to content

101t/jasmin-web-panel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jasmin Web Panel

travis-ci

Jasmin Web Application to manage Jasmin SMS Gateway

Table Of Contents:

  1. Installing and Deployment
  2. Release Notes
  3. Tracking Issue
  4. Contact Us

Installing and Deployment

Before starting please make sure you have installed and running Jasmin SMS Gateway on your server.

Installation

Download and Extract folder We recommended installing python dependencies in virtualenv

Install dependencies:

This version using python >= 3.5 make sure you have installed on your system.

go to jasmin-web-panel/ and run

cd jasmin-web-panel/
pip install -r requirements.txt
cp Sample.env .env

Preparing your database by running migrate commads:

python manage.py migrate
python manage.py load_new # to load new user
python manage.py collectstatic

These commands used in production server, also you may edit Jasmin SMS Gateway credential connection

TELNET_HOST = 127.0.0.1
TELNET_PORT = 8990
TELNET_USERNAME = jcliadmin
TELNET_PW = jclipwd
TELNET_TIMEOUT = 10

for production make sure DEBUG=False in .env file to ensure security. You may run project manually

python manage.py runserver

Deployment with NGiNX and Systemd

Make sure you have installed gunicorn using pip.

Navigate to /etc/systemd/system and create new service called jasmin-web.service

[Unit]
Description=Jasmin Web Panel
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=jasminwebpanel
PermissionsStartOnly=true
User=username
Group=username
Environment="DJANGO_SETTINGS_MODULE=config.settings.pro"
WorkingDirectory=/opt/jasmin-web-panel
ExecStart=/opt/jasmin-web-panel/env/bin/gunicorn --bind 127.0.0.1:8000 config.wsgi -w 3 --timeout=120 --log-level=error
StandardOutput=file:/opt/jasmin-web-panel/logs/gunicorn.log
StandardError=file:/opt/jasmin-web-panel/logs/gunicorn.log
StandardOutput=journal+console
Restart=on-failure

[Install]
WantedBy=multi-user.target

Reload systemd

sudo systemctl daemon-reload

Now, you can do:

sudo systemctl enable jasmin-web.service
sudo systemctl start jasmin-web.service

To ensure web app running without issue:

sudo systemctl status jasmin-web.service

For NGiNX go to /etc/nginx/sites-available and create a new file jasmin_web

upstream jasmin_web{
    server 127.0.0.1:8000;
}
server {
    listen 80;
    charset utf-8;
    server_name example.com www.example.com;
    client_body_timeout 500;
    client_header_timeout 500;
    keepalive_timeout 500 500;
    send_timeout 30;
    access_log /var/log/nginx/jasmin_web_access.log combined;
    error_log /var/log/nginx/jasmin_web_error.log;

    location / {
        proxy_pass http://jasmin_web;
        proxy_http_version 1.1;
        proxy_read_timeout 86400;
        proxy_redirect     off;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $server_name;
        proxy_max_temp_file_size 1600m;
        proxy_buffering off;
        proxy_request_buffering on;
        client_max_body_size 20M;
        client_body_buffer_size  256K;
    }

    location ^~ /media/ {
        root /opt/jasmin-web-panel/public/;
        add_header Accept-Ranges bytes;
    }
    location ^~ /static/ {
        root /opt/jasmin-web-panel/public/;
        add_header Pragma public;
        add_header Cache-Control "public";
        expires 30d;
    }
}

Note: Don't forget to replace example.com with your real domain

Once you are done, test and restart the Nginx Service with:

ln -s /etc/nginx/sites-available/jasmin_web /etc/nginx/sites-enabled/jasmin_web
sudo nginx -t
sudo nginx -s reload
# or sudo service nginx restart
# or sudo systemctl restart nginx

Login information:

Username: admin
Password: secret

Note: Please change the password to avoid the security issue

Deployment using Docker

You could download the built image on docker hub:

docker pull tarekaec/jasmin_web_panel

also, you could build it on your local machine by navigating to the project directory

docker build -f config/docker/slim/Dockerfile -t jasmin_web_panel:1.0 .

You need to configure the environment variable in .env file

DJANGO_SETTINGS_MODULE=config.settings.pro
PRODB_URL=postgres://username:strong_password@postgre_hostname:5432/jasmin_web_db
SYSCTL_HEALTH_CHECK=False # this option is not useful on docker

to start docker container

docker stack deploy -c docker-compose.yml jasmin1

you could check service on terminal

docker service ls | grep jasmin

Submit Log

To work with Submit Log you need to install and configure Submit Log service, make sure you have SUBMIT_LOG (default False) in environment variable:

SUBMIT_LOG=True

Release Notes

What's new in version 2.0.0

  1. UI Improved, jQuery Fixed, jQuery Validation added.
  2. Backend fixing, upgrade to python3 and fresh Django version.
  3. Telnet connector fixing.
  4. Deployment made easier.
  5. Fixing common connection issues.
  6. Simple dashboard initialized.
  7. User Profile, Change Password, Add Avatar.
  8. Activity Log, to log your usage.

What's new in version 2.0.1

  1. Adding Submit Log report (DLR report)

What's new in version 2.0.2

  1. Adding FailOverRouter supports to MT / MO Router

Tracking Issue

You may submit issue here

Contacts

For question and suggestion: [email protected], Join Telegram Channel: https://t.me/jasminwebpanel, all suggestion and questions are welcomed.