question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--cp option for datasette publish and datasette package for shipping additional files and directories

See original GitHub issue

I’m working on integrating Datasette into a documentation-oriented publishing workflow internally in my company, and in order to deploy the Docker image created by datasette package I need to add an additional file to the image — in my case, it’s a sort of a deployment directive. I’ve worked out a way to do this after the image has been created, but it’s convoluted and brittle.

So it’d be excellent if there was an additional option for this command, something like, like, --copy.

I’d envision it looking something like:

$ datasette package --copy /the/source/path:/the/target/path data.db

I’d be happy to help design, specify, implement, and test this feature, if you’d be interested.

Thanks for the fantastic tools!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
simonwcommented, Feb 28, 2020

Sure, --cp looks good to me.

1reaction
simonwcommented, Feb 22, 2020

Interesting feature suggestion.

My initial instinct was that this would be better handled using the layered nature of Docker - so build a Docker image with datasette package and then have a separate custom script which takes that image, copies in the extra data and outputs a new image.

But… datasette package is already meant to be more convenient than messing around with Docker by hand like this - so actually having a --copy option like you describe here feels like it’s within scope of what datasette package is meant to do.

So yeah - if you’re happy to design this I think it would be worth us adding.

Small design suggestion: allow --copy to be applied multiple times, so you can do something like this:

datasette package \
    --copy ~/project/templates /templates \
    --copy ~/project/README.md /README.md \
    data.db

Also since Click arguments can take multiple options I don’t think you need to have the : in there - although if it better matches Docker’s own UI it might be more consistent to have it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Publishing data - Datasette documentation
The datasette publish command will deploy a new Datasette instance containing your databases directly to a Heroku or Google Cloud hosting account. You...
Read more >
Search engine that covers various things, powered ... - GitHub
--cp option for datasette publish and datasette package for shipping additional files and directories simonw/datasette#675.
Read more >
Setting up Datasette, step by step - rixx.de
I use Datasette to make the data available to browse, query, plot, export, etc. Datasette is a brilliant project, because it makes data ......
Read more >
August 2018 – OUseful.Info, the blog…
The modules are defined using a JSON configuration file (module metadata and parameters), and a Python script (which does the actual data ...
Read more >
Older Posts - AlexChabot.net
Publishing datasette to Google Cloud Compute with GitHub Actions ... to search folders of files and display the results using datasette's ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found