Skip to content

Instantly share code, notes, and snippets.

@wjladams
Created September 27, 2024 18:09
Show Gist options
  • Save wjladams/c7b434d101431e4f7f6a7504d8091409 to your computer and use it in GitHub Desktop.
Save wjladams/c7b434d101431e4f7f6a7504d8091409 to your computer and use it in GitHub Desktop.
Shiny Python as a systemd.service example
[Unit]
Description=New deals pipeline shiny python app
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=ec2-user
ExecStart=/home/ec2-user/bin/nb-deals-shinyserver.sh
[Install]
WantedBy=multi-user.target
#!/bin/sh
cd /home/ec2-user/pipeline-app/shiny-dash
export PATH=/home/ec2-user/anaconda3/bin:${PATH}
export PYTHONPATH=${PYTHONPATH}:/home/ec2-user/pipeline-app
shiny run app.py --port YOUR_PORT --host YOUR_HOST_IP_ADDRESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment