{"html_url": "https://github.com/simonw/datasette/issues/272#issuecomment-504697742", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/272", "id": 504697742, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY5Nzc0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T20:55:59Z", "updated_at": "2019-06-22T20:56:22Z", "author_association": "OWNER", "body": "Getting this to work with both Sanic AND ASGI at the same time (via the classes described previously with an `--asgi` command-line option) is proving way trickier than I expected, mainly because of the complexity of [the current Datasette.app() method](https://github.com/simonw/datasette/blob/35429f90894321eda7f2db31b9ea7976f31f73ac/datasette/app.py#L545-L721).\r\n\r\nI'm going to drop the compatibility path for a bit and see if I can make progress on a pure-ASGI port.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324188953, "label": "Port Datasette to ASGI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/516#issuecomment-504697187", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/516", "id": 504697187, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY5NzE4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T20:46:35Z", "updated_at": "2019-06-22T20:46:35Z", "author_association": "OWNER", "body": "I'm going to resist the temptation to do this until I've merged the `asgi` branch from #272 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459509126, "label": "Enforce import sort order with isort"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/516#issuecomment-504696638", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/516", "id": 504696638, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY5NjYzOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T20:37:25Z", "updated_at": "2019-06-22T20:38:42Z", "author_association": "OWNER", "body": "This test added do `test_black.py` seems to do the trick:\r\n```python\r\n@pytest.mark.parametrize(\"path\", code_root.glob(\"**/*.py\"))\r\ndef test_isort(path):\r\n # Have to capture stdout because isort uses print() directly\r\n stdout = sys.stdout\r\n sys.stdout = io.StringIO()\r\n result = isort.SortImports(path, check=True)\r\n assert (\r\n not result.incorrectly_sorted\r\n ), \"{} has incorrectly sorted imports, fix with 'isort -rc . && black .'\"\r\n sys.stdout = stdout\r\n```\r\nI'll rename `test_black.py` to `test_lint.py` to reflect that it now covers more forms of linting.\r\n\r\nAlso needed: add `move_to_front(items, \"test_isort\")` to `conftest.py`. And add `isort` to `extras_require` in `setup.py`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459509126, "label": "Enforce import sort order with isort"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/516#issuecomment-504696610", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/516", "id": 504696610, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY5NjYxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T20:36:57Z", "updated_at": "2019-06-22T20:36:57Z", "author_association": "OWNER", "body": "According to [the black documentation](https://black.readthedocs.io/en/stable/the_black_code_style.html?highlight=isort.cfg) the following config file is necessary to avoid isort and black getting into an edit war with each other:\r\n```\r\n[settings]\r\nmulti_line_output=3\r\ninclude_trailing_comma=True\r\nforce_grid_wrap=0\r\nuse_parentheses=True\r\nline_length=88\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459509126, "label": "Enforce import sort order with isort"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/514#issuecomment-504663390", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/514", "id": 504663390, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY2MzM5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T12:52:27Z", "updated_at": "2019-06-22T12:52:27Z", "author_association": "OWNER", "body": "This example is useful to - I like how it has a Makefile that knows how to set up systemd: https://github.com/pikesley/Queube", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459397625, "label": "Documentation with recommendations on running Datasette in production without using Docker"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/514#issuecomment-504663201", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/514", "id": 504663201, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY2MzIwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T12:49:56Z", "updated_at": "2019-06-22T12:49:56Z", "author_association": "OWNER", "body": "Here are some partial notes I have saved from an nginx configuration I've used in the past:\r\n```\r\ncat /etc/nginx/sites-available/default\r\nserver {\r\n\tlisten 80 default_server;\r\n\tlisten [::]:80 default_server;\r\n\r\n location / {\r\n proxy_pass http://127.0.0.1:8001/;\r\n\t\tproxy_set_header Host $host;\r\n }\r\n...\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459397625, "label": "Documentation with recommendations on running Datasette in production without using Docker"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/514#issuecomment-504662987", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/514", "id": 504662987, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY2Mjk4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T12:46:39Z", "updated_at": "2019-06-22T12:46:39Z", "author_association": "OWNER", "body": "... and @russss also suggested systemd 21 seconds before I posted that!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459397625, "label": "Documentation with recommendations on running Datasette in production without using Docker"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/514#issuecomment-504662931", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/514", "id": 504662931, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY2MjkzMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T12:45:47Z", "updated_at": "2019-06-22T12:45:47Z", "author_association": "OWNER", "body": "I asked about this on Twitter and got a solid recommendation for systemd and this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units - via https://twitter.com/sil/status/1142412145990221825", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459397625, "label": "Documentation with recommendations on running Datasette in production without using Docker"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/514#issuecomment-504662063", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/514", "id": 504662063, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY2MjA2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T12:31:58Z", "updated_at": "2019-06-22T12:31:58Z", "author_association": "OWNER", "body": "This is also relevant to Datasette Library #417 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459397625, "label": "Documentation with recommendations on running Datasette in production without using Docker"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/514#issuecomment-504661990", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/514", "id": 504661990, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY2MTk5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T12:30:47Z", "updated_at": "2019-06-22T12:30:47Z", "author_association": "OWNER", "body": "A section in the Datasette docs that acts as recommendations plus a tutorial for running Datasette on a VPS without using a Docker would be excellent.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459397625, "label": "Documentation with recommendations on running Datasette in production without using Docker"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/514#issuecomment-504661909", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/514", "id": 504661909, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNDY2MTkwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-22T12:29:46Z", "updated_at": "2019-06-22T12:29:46Z", "author_association": "OWNER", "body": "I'm still trying to figure this out myself.\r\n\r\nI'm confident that running nginx on port 80 and using it to proxy traffic to Datasette is a sensible way to solve the port problem.\r\n\r\nAs for running Datasette itself: the two options that seem best to me are some kind of Init.d service or running it under supervisord. I have to admit I haven't worked out the necessary incantation for either of those yet: the solitary instance I have that's not running as a Docker container is sitting in a \"screen\" instance for the moment!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459397625, "label": "Documentation with recommendations on running Datasette in production without using Docker"}, "performed_via_github_app": null}