Created
September 27, 2024 18:09
-
-
Save wjladams/c7b434d101431e4f7f6a7504d8091409 to your computer and use it in GitHub Desktop.
Shiny Python as a systemd.service example
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
[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 |
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
#!/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