Created
June 11, 2022 10:32
-
-
Save parallaxhub/d7a62e90495f26b0d1574baabfe1af30 to your computer and use it in GitHub Desktop.
Jasmin SMS Gateway Deploy Production
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -i | |
apt update -y && apt-get upgrade -y | |
cd /opt/ | |
git clone https://github.com/101t/jasmin-web-panel.git | |
cd jasmin-web-panel/ | |
git init | |
git add . | |
git commit -m "first-pull" | |
git pull | |
apt-get install libpq-dev python-dev | |
nano /etc/nginx/sites-available/jasmin_web.conf | |
# Update | |
upstream jasmin_web{ | |
server 0.0.0.0:8000; | |
} | |
server { | |
charset utf-8; | |
server_name 0.0.0.0; | |
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; | |
} | |
} | |
# Save and exit ctrl+s and ctrl+x | |
systemctl restart jasmin-web.service | |
systemctl restart jasmin-restapi.service | |
# visit localhost or 0.0.0.0 or Your_IP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.mp4