Commit graph

23 commits

Author SHA1 Message Date
Simon Willison
af9cd4ca64 Fixes for new --memory option, refs #694 2020-03-05 17:44:15 -06:00
Simon Willison
ddd11b3ddd --memory option for publish cloudrun, refs #694 2020-03-05 17:34:36 -06:00
Katie McLaughlin
34d77d780f gcloud run is now GA, s/beta// (#660)
Thanks, @glasnt
2020-01-21 15:28:11 -08:00
Simon Willison
df2879ee2a Better documentation for --static, closes #641
https://datasette.readthedocs.io/en/stable/custom_templates.html#serving-static-files
2019-11-25 18:31:42 -08:00
Simon Willison
f524510230 Fix "publish heroku" + upgrade to use Python 3.8.0
Closes #633. Closes #632.
2019-11-13 08:42:47 -08:00
Simon Willison
83fc5165ac Improved UI for publish cloudrun, closes #608 2019-11-07 18:48:39 -08:00
Simon Willison
3e864b1625 Use --platform=managed for publish cloudrun, closes #587 2019-10-17 14:51:45 -07:00
Simon Willison
973f8f139d
--plugin-secret option for datasette publish
Closes #543

Also added new --show-files option to publish now and publish cloudrun - handy for debugging.
2019-07-07 19:06:31 -07:00
Simon Willison
e513a80afb Use -i with datasette publish, closes #469 2019-05-19 15:53:34 -07:00
Simon Willison
7d8573d672 Rename "datasette publish now" to "datasette publish nowv1"
Also added an alias so "datasette publish now" continues to work.

Closes #472
2019-05-19 11:06:51 -07:00
Simon Willison
666c37415a publish heroku now uses Python 3.6.8
Also refactored temporary_heroku_directory out of utils.py
2019-05-15 21:32:23 -07:00
Simon Willison
05cabaebd9 Pass --token to now alias, refs #459 2019-05-11 13:35:34 -07:00
Simon Willison
09ef305c68 Fixed "datasette publish now ... --alias=x"
The --alias argument can now be passed more than once.

Also updated our Travis configuration to use this.

Fixes #459
2019-05-11 13:20:36 -07:00
Simon Willison
f825e20121 Run black and update docs for #457 2019-05-09 09:48:13 -07:00
Simon Willison
b80b03ac9a datasette publish cloudrun --service=x, closes #457 2019-05-09 09:45:01 -07:00
Simon Willison
35d6ee2790
Apply black to everything, enforce via unit tests (#449)
I've run the black code formatting tool against everything:

    black tests datasette setup.py

I also added a new unit test, in tests/test_black.py, which will fail if the code does not
conform to black's exacting standards.

This unit test only runs on Python 3.6 or higher, because black itself doesn't run on 3.5.
2019-05-03 22:15:14 -04:00
Romain Primet
75a21fc2a1 datasette publish cloudrun (#434) - thanks, @rprimet
New publish subcommand that publishes using the
new Google Cloud Run platform.

    datasette publish cloudrun database.db
2019-05-03 09:59:01 -04:00
Simon Willison
bf6b0f918d about and about_url metadata options 2019-03-14 20:54:42 -07:00
Simon Willison
195a5b3634
Heroku --include-vcs-ignore (#407)
Means `datasette publish heroku` can work under Travis, unlike this failure:

https://travis-ci.org/simonw/fivethirtyeight-datasette/builds/488047550

```
2.25s$ datasette publish heroku fivethirtyeight.db -m metadata.json -n fivethirtyeight-datasette
tar: unrecognized option '--exclude-vcs-ignores'
Try 'tar --help' or 'tar --usage' for more information.
 ▸    Command failed: tar cz -C /tmp/tmpuaxm7i8f --exclude-vcs-ignores --exclude
 ▸    .git --exclude .gitmodules . >
 ▸    /tmp/f49440e0-1bf3-4d3f-9eb0-fbc2967d1fd4.tar.gz
 ▸    tar: unrecognized option '--exclude-vcs-ignores'
 ▸    Try 'tar --help' or 'tar --usage' for more information.
 ▸    
The command "datasette publish heroku fivethirtyeight.db -m metadata.json -n fivethirtyeight-datasette" exited with 0.
```

The fix for that issue is to call the heroku command like this:

    heroku builds:create -a app_name --include-vcs-ignore
2019-02-05 20:15:46 -08:00
Simon Willison
8b8ae55e7c Pass --token to 'now alias', if provided 2019-01-01 21:35:16 -08:00
Simon Willison
d95b46b09b datasette publish now --alias option
You can now use --alias to attempt to alias after you deploy.

Also updated now.json to use version: 1
2019-01-01 21:15:54 -08:00
Simon Willison
b6546da535
Use Zeit cloud v1 to avoid 100MB image limit
Closes #366 - thanks @slygent
2018-11-04 22:22:34 -08:00
Simon Willison
dbbe707841
publish_subcommand hook + default plugins mechanism, used for publish heroku/now (#349)
This change introduces a new plugin hook, publish_subcommand, which can be
used to implement new subcommands for the "datasette publish" command family.

I've used this new hook to refactor out the "publish now" and "publish heroku"
implementations into separate modules. I've also added unit tests for these
two publishers, mocking the subprocess.call and subprocess.check_output
functions.

As part of this, I introduced a mechanism for loading default plugins. These
are defined in the new "default_plugins" list inside datasette/app.py

Closes #217 (Plugin support for datasette publish)
Closes #348 (Unit tests for "datasette publish")
Refs #14, #59, #102, #103, #146, #236, #347
2018-07-25 22:15:59 -07:00