{"action":"created","comment":{"url":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/comments/201609581","pull_request_review_id":136142772,"id":201609581,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTYwOTU4MQ==","diff_hunk":"@@ -0,0 +1,233 @@\n+.. _uwsgi_tutorial:\n+\n+Running a Cookiecutter :app:`Pyramid` Application under :app:`uWSGI` and :app:`Nginx`\n+=====================================================================================\n+\n+``uWSGI`` is a software application for building hosting services.\n+It is named after the Web Server Gateway Interface (the WSGI specification\n+to which many Python web frameworks conform).\n+\n+This guide will outline broad steps that can be used to get a Cookiecutter\n+:app:`Pyramid` application running under Nginx via ``uWSGI``.  This particular\n+tutorial was developed under Ubuntu 18.04, but the instructions should be\n+largely the same for all systems, delta specific path information for commands\n+and files.\n+\n+\n+#.  Install prerequisites\n+\n+    .. code-block:: bash\n+\n+       $ sudo apt install -y uwsgi-core uwsgi-plugin-python3 python3-cookiecutter \\\n+                             python3-pip python3-venv nginx\n+       $ python3 -m cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master\n+\n+#.  Create a :app:`Pyramid` application. For this tutorial we'll use the\n+    ``starter`` :term:`cookiecutter`. See :ref:`project_narr` for more\n+    in-depth information about creating a new project.\n+\n+    .. code-block:: bash\n+\n+       $ cd\n+       $ cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master\n+\n+    If prompted for the first item, accept the default ``yes`` by hitting return.\n+\n+    .. code-block:: text\n+\n+        You've cloned ~/.cookiecutters/pyramid-cookiecutter-starter before.\n+        Is it okay to delete and re-clone it? [yes]: yes\n+        project_name [Pyramid Scaffold]: myproject\n+        repo_name [myproject]: myproject\n+        Select template_language:\n+        1 - jinja2\n+        2 - chameleon\n+        3 - mako\n+        Choose from 1, 2, 3 [1]: 1\n+\n+#.  Create a :term:`virtual environment` which we'll use to install our\n+    application.\n+\n+    .. code-block:: bash\n+\n+       $ cd myproject\n+       $ python3 -m venv env\n+\n+#.  Install your :app:`Pyramid` application and its dependencies.\n+\n+    .. code-block:: bash\n+\n+       $ env/bin/pip install -e \".[testing]\"\n+\n+#.  Within the project directory (``~/myproject``), create a script\n+    named ``wsgi.py``.  Give it these contents:\n+\n+    .. code-block:: python\n+\n+        # Adapted from PServeCommand.run in site-packages/pyramid/scripts/pserve.py\n+        from pyramid.scripts.common import get_config_loader\n+        app_name    = 'main'\n+        config_vars = {}\n+        config_uri  = 'production.ini'\n+\n+        loader = get_config_loader(config_uri)\n+        loader.setup_logging(config_vars)\n+        app = loader.get_wsgi_app(app_name, config_vars)","path":"docs/deployment/uwsgi_cookiecutter_nginx.rst","position":75,"original_position":75,"commit_id":"d192564f72feb68171a12232ff6a17fb96ddd2af","original_commit_id":"d192564f72feb68171a12232ff6a17fb96ddd2af","user":{"login":"pagenoare","id":1623,"node_id":"MDQ6VXNlcjE2MjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1623?v=4","gravatar_id":"","url":"https://api.github.com/users/pagenoare","html_url":"https://github.com/pagenoare","followers_url":"https://api.github.com/users/pagenoare/followers","following_url":"https://api.github.com/users/pagenoare/following{/other_user}","gists_url":"https://api.github.com/users/pagenoare/gists{/gist_id}","starred_url":"https://api.github.com/users/pagenoare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pagenoare/subscriptions","organizations_url":"https://api.github.com/users/pagenoare/orgs","repos_url":"https://api.github.com/users/pagenoare/repos","events_url":"https://api.github.com/users/pagenoare/events{/privacy}","received_events_url":"https://api.github.com/users/pagenoare/received_events","type":"User","site_admin":false},"body":"I believe those options requires `PasteScript` dependency to run correctly though. Might be worth mentioning.","created_at":"2018-07-11T08:45:36Z","updated_at":"2018-07-11T08:45:37Z","html_url":"https://github.com/Pylons/pyramid_cookbook/pull/208#discussion_r201609581","pull_request_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/208","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/comments/201609581"},"html":{"href":"https://github.com/Pylons/pyramid_cookbook/pull/208#discussion_r201609581"},"pull_request":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/208"}},"in_reply_to_id":201607621},"pull_request":{"url":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/208","id":200561013,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNTYxMDEz","html_url":"https://github.com/Pylons/pyramid_cookbook/pull/208","diff_url":"https://github.com/Pylons/pyramid_cookbook/pull/208.diff","patch_url":"https://github.com/Pylons/pyramid_cookbook/pull/208.patch","issue_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/issues/208","number":208,"state":"open","locked":false,"title":"New tutorial: Cookiecutter Pyramid + uWSGI + Nginx","user":{"login":"jackdesert","id":791315,"node_id":"MDQ6VXNlcjc5MTMxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/791315?v=4","gravatar_id":"","url":"https://api.github.com/users/jackdesert","html_url":"https://github.com/jackdesert","followers_url":"https://api.github.com/users/jackdesert/followers","following_url":"https://api.github.com/users/jackdesert/following{/other_user}","gists_url":"https://api.github.com/users/jackdesert/gists{/gist_id}","starred_url":"https://api.github.com/users/jackdesert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackdesert/subscriptions","organizations_url":"https://api.github.com/users/jackdesert/orgs","repos_url":"https://api.github.com/users/jackdesert/repos","events_url":"https://api.github.com/users/jackdesert/events{/privacy}","received_events_url":"https://api.github.com/users/jackdesert/received_events","type":"User","site_admin":false},"body":"New tutorial for running a Cookiecutter Pyramid apps with uWSGI and Nginx.\r\nAdapted rom the original tutorial for mod_wsgi at https://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/modwsgi/index.html\r\n\r\n@stevepiercy It appears that you and I have both been writing uWSGI tutorials in the last day. Perhaps there is room for them both in the cookbook. ","created_at":"2018-07-11T00:56:38Z","updated_at":"2018-07-11T08:45:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"926f3c6e29a22f217e576d710de5ec116d3936cd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/208/commits","review_comments_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/208/comments","review_comment_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/issues/208/comments","statuses_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/statuses/d192564f72feb68171a12232ff6a17fb96ddd2af","head":{"label":"jackdesert:uwsgi-cookiecutter-nginx","ref":"uwsgi-cookiecutter-nginx","sha":"d192564f72feb68171a12232ff6a17fb96ddd2af","user":{"login":"jackdesert","id":791315,"node_id":"MDQ6VXNlcjc5MTMxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/791315?v=4","gravatar_id":"","url":"https://api.github.com/users/jackdesert","html_url":"https://github.com/jackdesert","followers_url":"https://api.github.com/users/jackdesert/followers","following_url":"https://api.github.com/users/jackdesert/following{/other_user}","gists_url":"https://api.github.com/users/jackdesert/gists{/gist_id}","starred_url":"https://api.github.com/users/jackdesert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackdesert/subscriptions","organizations_url":"https://api.github.com/users/jackdesert/orgs","repos_url":"https://api.github.com/users/jackdesert/repos","events_url":"https://api.github.com/users/jackdesert/events{/privacy}","received_events_url":"https://api.github.com/users/jackdesert/received_events","type":"User","site_admin":false},"repo":{"id":140502514,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA1MDI1MTQ=","name":"pyramid_cookbook","full_name":"jackdesert/pyramid_cookbook","owner":{"login":"jackdesert","id":791315,"node_id":"MDQ6VXNlcjc5MTMxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/791315?v=4","gravatar_id":"","url":"https://api.github.com/users/jackdesert","html_url":"https://github.com/jackdesert","followers_url":"https://api.github.com/users/jackdesert/followers","following_url":"https://api.github.com/users/jackdesert/following{/other_user}","gists_url":"https://api.github.com/users/jackdesert/gists{/gist_id}","starred_url":"https://api.github.com/users/jackdesert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackdesert/subscriptions","organizations_url":"https://api.github.com/users/jackdesert/orgs","repos_url":"https://api.github.com/users/jackdesert/repos","events_url":"https://api.github.com/users/jackdesert/events{/privacy}","received_events_url":"https://api.github.com/users/jackdesert/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jackdesert/pyramid_cookbook","description":"Pyramid cookbook recipes (documentation)","fork":true,"url":"https://api.github.com/repos/jackdesert/pyramid_cookbook","forks_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/forks","keys_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/teams","hooks_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/hooks","issue_events_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/issues/events{/number}","events_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/events","assignees_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/assignees{/user}","branches_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/branches{/branch}","tags_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/tags","blobs_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/statuses/{sha}","languages_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/languages","stargazers_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/stargazers","contributors_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/contributors","subscribers_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/subscribers","subscription_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/subscription","commits_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/contents/{+path}","compare_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/merges","archive_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/downloads","issues_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/issues{/number}","pulls_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/pulls{/number}","milestones_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/milestones{/number}","notifications_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/labels{/name}","releases_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/releases{/id}","deployments_url":"https://api.github.com/repos/jackdesert/pyramid_cookbook/deployments","created_at":"2018-07-11T00:49:11Z","updated_at":"2018-07-11T00:49:13Z","pushed_at":"2018-07-11T00:49:52Z","git_url":"git://github.com/jackdesert/pyramid_cookbook.git","ssh_url":"git@github.com:jackdesert/pyramid_cookbook.git","clone_url":"https://github.com/jackdesert/pyramid_cookbook.git","svn_url":"https://github.com/jackdesert/pyramid_cookbook","homepage":"http://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/","size":4272,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Pylons:master","ref":"master","sha":"c51d24c914efa19a11aab3b3a8401fcc781fb253","user":{"login":"Pylons","id":452227,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MjIyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/452227?v=4","gravatar_id":"","url":"https://api.github.com/users/Pylons","html_url":"https://github.com/Pylons","followers_url":"https://api.github.com/users/Pylons/followers","following_url":"https://api.github.com/users/Pylons/following{/other_user}","gists_url":"https://api.github.com/users/Pylons/gists{/gist_id}","starred_url":"https://api.github.com/users/Pylons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pylons/subscriptions","organizations_url":"https://api.github.com/users/Pylons/orgs","repos_url":"https://api.github.com/users/Pylons/repos","events_url":"https://api.github.com/users/Pylons/events{/privacy}","received_events_url":"https://api.github.com/users/Pylons/received_events","type":"Organization","site_admin":false},"repo":{"id":1198154,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk4MTU0","name":"pyramid_cookbook","full_name":"Pylons/pyramid_cookbook","owner":{"login":"Pylons","id":452227,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MjIyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/452227?v=4","gravatar_id":"","url":"https://api.github.com/users/Pylons","html_url":"https://github.com/Pylons","followers_url":"https://api.github.com/users/Pylons/followers","following_url":"https://api.github.com/users/Pylons/following{/other_user}","gists_url":"https://api.github.com/users/Pylons/gists{/gist_id}","starred_url":"https://api.github.com/users/Pylons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pylons/subscriptions","organizations_url":"https://api.github.com/users/Pylons/orgs","repos_url":"https://api.github.com/users/Pylons/repos","events_url":"https://api.github.com/users/Pylons/events{/privacy}","received_events_url":"https://api.github.com/users/Pylons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Pylons/pyramid_cookbook","description":"Pyramid cookbook recipes (documentation)","fork":false,"url":"https://api.github.com/repos/Pylons/pyramid_cookbook","forks_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/forks","keys_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/teams","hooks_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/hooks","issue_events_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/issues/events{/number}","events_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/events","assignees_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/assignees{/user}","branches_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/branches{/branch}","tags_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/tags","blobs_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/statuses/{sha}","languages_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/languages","stargazers_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/stargazers","contributors_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/contributors","subscribers_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/subscribers","subscription_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/subscription","commits_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/contents/{+path}","compare_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/merges","archive_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/downloads","issues_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/issues{/number}","pulls_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls{/number}","milestones_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/milestones{/number}","notifications_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/labels{/name}","releases_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/releases{/id}","deployments_url":"https://api.github.com/repos/Pylons/pyramid_cookbook/deployments","created_at":"2010-12-26T05:21:21Z","updated_at":"2018-07-11T08:11:04Z","pushed_at":"2018-07-11T08:29:10Z","git_url":"git://github.com/Pylons/pyramid_cookbook.git","ssh_url":"git@github.com:Pylons/pyramid_cookbook.git","clone_url":"https://github.com/Pylons/pyramid_cookbook.git","svn_url":"https://github.com/Pylons/pyramid_cookbook","homepage":"http://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/","size":4270,"stargazers_count":172,"watchers_count":172,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":125,"open_issues":7,"watchers":172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/208"},"html":{"href":"https://github.com/Pylons/pyramid_cookbook/pull/208"},"issue":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/issues/208"},"comments":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/issues/208/comments"},"review_comments":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/Pylons/pyramid_cookbook/statuses/d192564f72feb68171a12232ff6a17fb96ddd2af"}},"author_association":"NONE"}}
{"actor":{"display_login":"pagenoare"}}