dcyoung / dcyoung.github.io

A personal blog, knowledge base and project archive.
https://dcyoung.github.io
1 stars 0 forks source link

post-streamlit-keep-alive/ #1

Open utterances-bot opened 2 months ago

utterances-bot commented 2 months ago

Automating a Keep-Alive Probe for Deployed Apps

Automating a keep-alive probe for a deployed streamlit app using puppeteer and Github Actions.

https://dcyoung.github.io/post-streamlit-keep-alive/

JeanMILPIED commented 2 months ago

Hi David, I failed to implement yur solutions so I mae these changes:

workflow

name: Trigger Probe of Deployed App on a CRON Schedule on: schedule:

Runs "at minute 0 past every 48 hour" (see https://crontab.guru)... ie: every 2 days

- cron: '0 */48 * * *'

Allows you to run this workflow manually from the Actions tab

workflow_dispatch:

jobs: build-and-probe: runs-on: ubuntu-latest steps:

Dockerfile:

probe-action/Dockerfile

FROM ghcr.io/puppeteer/puppeteer:17.0.0 COPY ./probe-action/probe.js /home/pptruser/src/probe.js ENTRYPOINT [ "/bin/bash", "-c", "node -e \"$(</home/pptruser/src/probe.js)\"" ]

Thanks for the tip, it is excellent !