Wykres commitów

46 Commity (main)

Autor SHA1 Wiadomość Data
Simon Willison bd39cb4805 Use service-specific image ID for Cloud Run deploys, refs #2036 2023-03-08 12:25:55 -08:00
Simon Willison 733447d7c7 Upgrade to Python 3.11 on Heroku, refs #1905 2022-11-18 16:44:46 -08:00
Simon Willison 72ac9bf82f --generate-dir option to publish heroku, refs #1905 2022-11-18 16:34:33 -08:00
Simon Willison 82167105ee --min-instances and --max-instances Cloud Run publish options, closes #1779 2022-08-14 10:07:30 -07:00
Simon Willison e64d14e413 Use type integer for --timeout, refs #1717 2022-04-24 07:09:08 -07:00
Tim Sherratt 3001e1e394
Add timeout option to Cloudrun build (#1717)
* Add timeout option for build phase
* Make the --timeout setting optional
* Add test for --timeout setting

Thanks, @wragge
2022-04-24 07:03:08 -07:00
Simon Willison 515f8d38eb Help summaries for publish cloudrun/heroku 2022-01-13 16:12:54 -08:00
Simon Willison a1f3830356 --cpu option for datasette publish cloudrun, closes #1420 2021-08-03 22:20:50 -07:00
Simon Willison 1a8972f9c0
Upgrade Heroku runtime to python-3.8.10 2021-05-27 09:11:03 -07:00
Simon Willison 6ad544df5e Fixed master -> main in a bunch of places, mainly docs 2021-03-23 09:19:41 -07:00
Konstantin Baikov 8e18c79431
Use context manager instead of plain open (#1211)
Context manager with open closes the files after usage.

When the object is already a pathlib.Path i used read_text
write_text functions

In some cases pathlib.Path.open were used in context manager,
it is basically the same as builtin open.

Thanks, Konstantin Baikov!
2021-03-11 08:15:49 -08:00
Simon Willison 25c2933667 publish heroku now uses python-3.8.7 2021-01-22 16:46:25 -08:00
Simon Willison e1efa9b7a3 force_https_urls on for publish cloudrun, refs #1178 2021-01-06 10:13:34 -08:00
Simon Willison 37d18a5bce datasette publish cloudrun --apt-get-install, closes #1110 2020-11-24 19:05:35 -08:00
Simon Willison 30e64c8d3b
Use f-strings in place of .format()
Code transformed like so:

    pip install flynt
    flynt .
    black .
2020-11-15 15:24:22 -08:00
Simon Willison e4554c37b7 datasette publish heroku --tar option, closes #969 2020-10-08 16:30:46 -07:00
Simon Willison 107d0887a6 datasette publish heroku now uses Python 3.8.6 2020-10-08 16:22:11 -07:00
Simon Willison 86823ae6f7 Default to Uvicorn workers=1, refs #999 2020-10-08 16:16:55 -07:00
Simon Willison b21ed237ab
publish heroku now deploys with Python 3.8.5 2020-08-18 13:49:13 -07:00
Simon Willison 98632f0a87
--secret command for datasette publish
Closes #787
2020-06-11 09:02:03 -07:00
Simon Willison 371170eee8 publish heroku now deploys with Python 3.8.3 2020-06-11 08:44:44 -07:00
Simon Willison e0e7a0facf Removed Zeit Now v1 support, closes #710 2020-04-04 16:04:33 -07:00
Simon Willison 6717c719dd
--metadata accepts YAML as well as JSON - closes #713 2020-04-02 12:30:53 -07:00
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