{"html_url": "https://github.com/simonw/datasette/issues/112#issuecomment-345255655", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/112", "id": 345255655, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTI1NTY1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-17T14:19:23Z", "updated_at": "2017-11-17T14:19:23Z", "author_association": "OWNER", "body": "I tesed this by first building and running a container using the new\r\nDockerfile from #114:\r\n\r\n docker build .\r\n docker run -it -p 8001:8001 6c9ca7e29181 /bin/sh\r\n\r\nThen I ran this inside the container itself:\r\n\r\n apt update && apt-get install wget -y \\\r\n && wget http://www.gaia-gis.it/spatialite-2.3.1/test-2.3.sqlite.gz \\\r\n && gunzip test-2.3.sqlite.gz \\\r\n && mv test-2.3.sqlite test23.sqlite \\\r\n && datasette -h 0.0.0.0 test23.sqlite\r\n\r\nI visited this URL to confirm I got an error due to spatialite not being\r\nloaded:\r\n\r\nhttp://localhost:8001/test23-c88bc35?sql=select+ST_AsText%28Geometry%29+from+HighWays+limit+1\r\n\r\nThen I checked that loading it with `--load-extension` worked correctly:\r\n\r\n datasette -h 0.0.0.0 test23.sqlite \\\r\n --load-extension=/usr/lib/x86_64-linux-gnu/mod_spatialite.so\r\n\r\nThen, finally, I tested it with the new environment variable option:\r\n\r\n SQLITE_EXTENSIONS=/usr/lib/x86_64-linux-gnu/mod_spatialite.so \\\r\n datasette -h 0.0.0.0 test23.sqlite\r\n\r\nRunning it with an invalid environment variable option shows an error:\r\n\r\n $ SQLITE_EXTENSIONS=/usr/lib/x86_64-linux-gnu/blah.so datasette \\\r\n -h 0.0.0.0 test23.sqlite\r\n Usage: datasette -h [OPTIONS] [FILES]...\r\n\r\n Error: Invalid value for \"--load-extension\": Path \"/usr/lib/x86_64-linux-gnu/blah.so\" does not exist.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274617240, "label": "Allow --load-extension to be set via environment variables"}, "performed_via_github_app": null}