Skip to content

Set up a live demo Datasette instance #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
simonw opened this issue Nov 12, 2019 · 9 comments
Closed

Set up a live demo Datasette instance #13

simonw opened this issue Nov 12, 2019 · 9 comments
Labels
enhancement New feature or request
Milestone

Comments

@simonw
Copy link
Collaborator

simonw commented Nov 12, 2019

I deployed https://github-to-sqlite-releases-j7hipcg4aq-uc.a.run.app/ by running this:

#!/bin/bash
# Fetch repos for simonw and dogsheep
github-to-sqlite repos github.db simonw dogsheep -a auth.json

# Fetch releases for the repos tagged 'datasette-io'
sqlite-utils github.db "
select full_name from repos where rowid in (
    select repos.rowid from repos, json_each(repos.topics) j
    where j.value = 'datasette-io'
)" --csv --no-headers | while read repo;
    do github-to-sqlite releases \
            github.db $(echo $repo | tr -d '\r') \
            -a auth.json;
        sleep 2;
    done;

And then deploying using this:

$ datasette publish cloudrun github.db \
  --title "github-to-sqlite releases demo" \
  --about_url="https://github.com/simonw/github-to-sqlite" \
  --about='github-to-sqlite' \
  --install=datasette-render-markdown \
  --install=datasette-json-html \
  --service=github-to-sqlite-releases

This should happen automatically for every release. I can run it once a day in Circle CI to keep the demo database up-to-date.

@simonw simonw added the enhancement New feature or request label Nov 12, 2019
@simonw simonw added this to the 1.0 milestone Mar 23, 2020
@simonw
Copy link
Collaborator Author

simonw commented Mar 23, 2020

I'm going to do this with a scheduled GitHub Action in this repo.

@simonw
Copy link
Collaborator Author

simonw commented Mar 23, 2020

I'll run the commits and issues and issue-comments commands in addition to the releases command.

@simonw
Copy link
Collaborator Author

simonw commented Mar 23, 2020

Following these instructions: https://simonwillison.net/2020/Jan/21/github-actions-cloud-run/

simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
Otherwise the demo will leak my private simonw repos
simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
simonw added a commit that referenced this issue Mar 23, 2020
@simonw
Copy link
Collaborator Author

simonw commented Mar 23, 2020

Urgh this is such a mess! I should have done this on a branch / pull request to avoid polluting my main master history, but never mind.

@simonw
Copy link
Collaborator Author

simonw commented Mar 23, 2020

@simonw
Copy link
Collaborator Author

simonw commented Mar 23, 2020

@simonw
Copy link
Collaborator Author

simonw commented Mar 23, 2020

I pointed https://github-to-sqlite.dogsheep.net/ at it. May take a few minutes for the new certificate to provision though.

@simonw
Copy link
Collaborator Author

simonw commented Mar 23, 2020

Next step: use a metadata.json file to add some extras. And add the datasette-render-markdown plugin as soon as I ship simonw/datasette-render-markdown#2 (GFM support).

simonw added a commit that referenced this issue Mar 23, 2020
@simonw
Copy link
Collaborator Author

simonw commented Mar 24, 2020

This is good enough for the 1.0 release.

@simonw simonw closed this as completed Mar 24, 2020
simonw added a commit that referenced this issue Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant