Skip to content
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

datasette publish --install=name-of-plugin #223

Closed
simonw opened this issue Apr 18, 2018 · 3 comments
Closed

datasette publish --install=name-of-plugin #223

simonw opened this issue Apr 18, 2018 · 3 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented Apr 18, 2018

Mechanism for causing datasette publish and datasette package to install one or more additional plugins using pip install - refs #14

@simonw simonw added the plugins label Apr 18, 2018
@simonw
Copy link
Owner Author

simonw commented Apr 18, 2018

Demo:

datasette publish now sortable.db --install datasette-plugin-demos --branch=master

Produced this deployment, with both the random_integer() function and the static file from https://github.com/simonw/datasette-plugin-demos/tree/0.2

https://datasette-issue-223.now.sh/-/static-plugins/datasette_plugin_demos/plugin.js

https://datasette-issue-223.now.sh/sortable-4bbaa6f?sql=select+random_integer%280%2C+10%29

@simonw
Copy link
Owner Author

simonw commented Apr 18, 2018

Tested on Heroku as well.

datasette publish heroku sortable.db --install datasette-plugin-demos --branch=master

https://morning-tor-45944.herokuapp.com/-/static-plugins/datasette_plugin_demos/plugin.js

https://morning-tor-45944.herokuapp.com/sortable-4bbaa6f?sql=select+random_integer%280%2C+10%29

@simonw
Copy link
Owner Author

simonw commented Apr 18, 2018

And tested datasette package - this time exercising the ability to pass more than one --install option:

$ datasette package sortable.db --branch=master --install requests --install datasette-plugin-demos
Sending build context to Docker daemon  125.4kB
Step 1/7 : FROM python:3
 ---> 79e1dc9af1c1
Step 2/7 : COPY . /app
 ---> 6e8e40bce378
Step 3/7 : WORKDIR /app
Removing intermediate container 7cdc9ab20d09
 ---> f42258c2211f
Step 4/7 : RUN pip install https://github.com/simonw/datasette/archive/master.zip requests datasette-plugin-demos
 ---> Running in a0f17cec08a4
Collecting ...
Removing intermediate container a0f17cec08a4
 ---> beea84e73271
Step 5/7 : RUN datasette inspect sortable.db --inspect-file inspect-data.json
 ---> Running in 4daa28792348
Removing intermediate container 4daa28792348
 ---> c60312d21b99
Step 6/7 : EXPOSE 8001
 ---> Running in fa728468482d
Removing intermediate container fa728468482d
 ---> 8f219a61fddc
Step 7/7 : CMD ["datasette", "serve", "--host", "0.0.0.0", "sortable.db", "--cors", "--port", "8001", "--inspect-file", "inspect-data.json"]
 ---> Running in cd4eaeb2ce9e
Removing intermediate container cd4eaeb2ce9e
 ---> 066e257c7c44
Successfully built 066e257c7c44
(venv) datasette $ docker run -p 8081:8001 066e257c7c44
Serve! files=('sortable.db',) on port 8001
[2018-04-18 14:40:18 +0000] [1] [INFO] Goin' Fast @ http://0.0.0.0:8001
[2018-04-18 14:40:18 +0000] [1] [INFO] Starting worker [1]
[2018-04-18 14:46:01 +0000] - (sanic.access)[INFO][1:7]: GET http://localhost:8081/-/static-plugins/datasette_plugin_demos/plugin.js  200 16

simonw added a commit that referenced this issue Apr 18, 2018
Allows you to specify one or more additional packages to be installed,
useful for deploying plugins.
simonw added a commit that referenced this issue Apr 18, 2018
@simonw simonw closed this as completed in 404fa22 Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant