{"html_url": "https://github.com/simonw/datasette/issues/327#issuecomment-1043609198", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/327", "id": 1043609198, "node_id": "IC_kwDOBm6k_c4-NDZu", "user": {"value": 208018, "label": "dholth"}, "created_at": "2022-02-17T23:21:36Z", "updated_at": "2022-02-17T23:33:01Z", "author_association": "NONE", "body": "On fly.io. This particular database goes from 1.4GB to 200M. Slower, part of that might be having no `--inspect-file`?\r\n\r\n```\r\n$ datasette publish fly ... --generate-dir /tmp/deploy-this\r\n...\r\n$ mksquashfs large.db large.squashfs\r\n$ rm large.db # don't accidentally put it in the image\r\n$ cat Dockerfile\r\nFROM python:3.8\r\nCOPY . /app\r\nWORKDIR /app\r\n\r\nENV DATASETTE_SECRET 'xyzzy'\r\nRUN pip install -U datasette\r\n# RUN datasette inspect large.db --inspect-file inspect-data.json\r\nENV PORT 8080\r\nEXPOSE 8080\r\nCMD mount -o loop -t squashfs large.squashfs /mnt; datasette serve --host 0.0.0.0 -i /mnt/large.db --cors --port $PORT\r\n```\r\n\r\nIt would also be possible to copy the file onto the ~6GB available on the ephemeral container filesystem on startup. A little against the spirit of the thing? On this example the whole docker image is 2.42 GB and the squashfs version is 1.14 GB.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 335200136, "label": "Explore if SquashFS can be used to shrink size of packaged Docker containers"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/327#issuecomment-1043626870", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/327", "id": 1043626870, "node_id": "IC_kwDOBm6k_c4-NHt2", "user": {"value": 208018, "label": "dholth"}, "created_at": "2022-02-17T23:37:24Z", "updated_at": "2022-02-17T23:37:24Z", "author_association": "NONE", "body": "On second thought any kind of quick-to-decompress-on-startup could be helpful if we're paying for the container registry and deployment bandwidth but not ephemeral storage.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 335200136, "label": "Explore if SquashFS can be used to shrink size of packaged Docker containers"}, "performed_via_github_app": null}