- Notifications
You must be signed in to change notification settings - Fork91
📨 Jasmin Web Panel for Jasmin SMS Gateway
101t/jasmin-web-panel
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Jasmin Web Application to manageJasmin SMS Gateway
Before starting please make sure you have installed and runningJasmin SMS Gateway on your server.
Download and Extract folder We recommended installing python dependencies invirtualenv
Install dependencies:
This version using
python >= 3.11
make sure you have installed on your system.
go tojasmin-web-panel/
and run
cd jasmin-web-panel/pip install --upgrade pip wheel uvuv pip install -r pyproject.toml --extra=prodcp sample.env .env
Preparing yourdatabase
by running migrate commads:
python manage.py migratepython manage.py samplespython manage.py collectstatic --no-input
These commands used in production server, also you may editJasmin SMS Gateway credential connection
TELNET_HOST=127.0.0.1TELNET_PORT=8990TELNET_USERNAME=jcliadminTELNET_PW=jclipwdTELNET_TIMEOUT=10
for production make sureDEBUG=False
in.env
file to ensure security.You may run project manually
python manage.py runserver
Make sure you have installed
gunicorn
usingpip
.
Navigate to/etc/systemd/system
and create new service calledjasmin-web.service
[Unit]Description=Jasmin Web PanelRequires=postgresql.serviceAfter=network.target postgresql.service[Service]Type=simpleSyslogIdentifier=jasminwebpanelPermissionsStartOnly=trueUser=usernameGroup=usernameEnvironment="DJANGO_SETTINGS_MODULE=config.settings.pro"WorkingDirectory=/opt/jasmin-web-panelExecStart=/opt/jasmin-web-panel/env/bin/gunicorn --bind 127.0.0.1:8000 config.wsgi -w 3 --timeout=120 --log-level=infoStandardOutput=file:/opt/jasmin-web-panel/logs/gunicorn.logStandardError=file:/opt/jasmin-web-panel/logs/gunicorn_error.logStandardOutput=journal+consoleRestart=on-failure[Install]WantedBy=multi-user.target
Reload systemd
sudo systemctl daemon-reload
Now, you can do:
sudo systemctlenable jasmin-web.servicesudo 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 filejasmin_web
upstreamjasmin_web{server 127.0.0.1:8000;}server {listen80;charset utf-8;# server_name sms.example.com;server_name _;# for IP Address accessclient_body_timeout500;client_header_timeout500;keepalive_timeout500500;send_timeout30;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_version1.1;proxy_read_timeout86400;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_size1600m;proxy_buffering off;proxy_request_buffering on;client_max_body_size20M;client_body_buffer_size256K; }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";expires30d; }}
Note: Don't forget to replace
sms.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_websudo nginx -tsudo nginx -s reload# or sudo service nginx restart# or sudo systemctl restart nginx
Username: adminPassword: secret# please change the default password to avoid the security issue
You could download the built image ondocker 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:latest.
You need to configure the environment variable in.env
file
DJANGO_SETTINGS_MODULE=config.settings.proPRODB_URL=postgres://username:strong_password@postgre_hostname:5432/jasmin_web_db
to start docker container
docker stack deploy -c docker-compose.yml jasmin1
you could check service on terminal
docker service ls| grep jasmin
You need to configure the environment variable in.env
fileYou also need to comment line 38 of "config/docker/slim/Dockerfile" (ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjemalloc.so.2)Then start docker container in detach mode. You can remove "-d" if you want to see logs
docker compose up -d
Then check docker containers
docker ps
To work with Submit Log you need to install and configureSubmit Log service, make sure you haveSUBMIT_LOG
(defaultFalse
) in environment variable:
SUBMIT_LOG=True
You may submit issuehere
For question and suggestion:tarek.it.eng@gmail.com, Join Telegram Channel:https://t.me/jasminwebpanel, all suggestion and questions are welcomed.
About
📨 Jasmin Web Panel for Jasmin SMS Gateway
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.