Run these commands on your server:
systemctl start asupdatessystemctl start club-trackersystemctl start glanceCheck status:
systemctl status asupdatessystemctl status club-trackersystemctl status glanceGo into the app folder:
cd ~/app-name
Pull latest changes:
git pull
Restart the service:
systemctl restart app-name
Example:
cd ~/asupdates && git pull && systemctl restart asupdates
1. Go to home directory:
cd ~
2. Create folder:
mkdir new-app && cd new-app
3. Set up Python environment:
python3 -m venv venv
4. Install requirements:
./venv/bin/pip install -r requirements.txt
5. Create systemd service:
nano /etc/systemd/system/new-app.service
6. Add service:
[Unit]
Description=New App
After=network.target
[Service]
WorkingDirectory=/root/new-app
ExecStart=/root/new-app/venv/bin/python app.py
Restart=always
User=root
[Install]
WantedBy=multi-user.target
7. Enable and start:
systemctl daemon-reload && systemctl enable new-app && systemctl start new-app