mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Reworked metadata building options
Building metadata is now optional. If you want to do it, do this:
datasette build *.db --metadata=metadata.json
Then when you run the server you can tell it to read from metadata:
datasette serve *.db --metadata=metadata.json
The Dockerfile generated by datasette publish now uses this mechanism.
Closes #60
This commit is contained in:
parent
ad8b5d3bd2
commit
40a563ebac
4 changed files with 98 additions and 89 deletions
|
|
@ -122,10 +122,10 @@ def make_dockerfile(files):
|
|||
FROM python:3
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN pip install https://static.simonwillison.net/static/2017/datasette-0.1-py3-none-any.whl
|
||||
RUN datasette build {}
|
||||
RUN pip install https://static.simonwillison.net/static/2017/datasette-0.2-py3-none-any.whl
|
||||
RUN datasette build_metadata {} --metadata metadata.json
|
||||
EXPOSE 8006
|
||||
CMD ["datasette", "serve", {}, "--port", "8006"]'''.format(
|
||||
CMD ["datasette", "serve", {}, "--port", "8006", "--metadata", "metadata.json"]'''.format(
|
||||
' '.join(files),
|
||||
'"' + '", "'.join(files) + '"',
|
||||
).strip()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue