Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (22 sloc) 864 Bytes
# build datasette
FROM python:3 as installer
RUN pip wheel --wheel-dir=/wheels datasette datasette-cluster-map
# generate database
FROM python:3 as builder
RUN pip install csvs-to-sqlite
COPY urls.txt .
RUN wget --input-file=urls.txt
# TODO: pass separator as build argument
RUN csvs-to-sqlite *.csv data.db --separator '¬' --skip-errors
# serve application
FROM python:3-slim
COPY --from=installer /wheels /wheels
RUN pip install --no-index --find-links=/wheels datasette datasette-cluster-map
COPY --from=builder /data/data.db .
RUN datasette inspect data.db --inspect-file inspect-data.json
# TODO: use $PORT
CMD ["datasette", "serve", "data.db", "--host", "", "--cors", "--port", "8080", "--inspect-file", "inspect-data.json"]
You can’t perform that action at this time.