{"action":"created","issue":{"url":"https://api.github.com/repos/CodePier/CodePier-Issues/issues/2","repository_url":"https://api.github.com/repos/CodePier/CodePier-Issues","labels_url":"https://api.github.com/repos/CodePier/CodePier-Issues/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/CodePier/CodePier-Issues/issues/2/comments","events_url":"https://api.github.com/repos/CodePier/CodePier-Issues/issues/2/events","html_url":"https://github.com/CodePier/CodePier-Issues/issues/2","id":336436037,"node_id":"MDU6SXNzdWUzMzY0MzYwMzc=","number":2,"title":"[New Feature] Create A Swift Website Type","user":{"login":"mikebronner","id":1791050,"node_id":"MDQ6VXNlcjE3OTEwNTA=","avatar_url":"https://avatars0.githubusercontent.com/u/1791050?v=4","gravatar_id":"","url":"https://api.github.com/users/mikebronner","html_url":"https://github.com/mikebronner","followers_url":"https://api.github.com/users/mikebronner/followers","following_url":"https://api.github.com/users/mikebronner/following{/other_user}","gists_url":"https://api.github.com/users/mikebronner/gists{/gist_id}","starred_url":"https://api.github.com/users/mikebronner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikebronner/subscriptions","organizations_url":"https://api.github.com/users/mikebronner/orgs","repos_url":"https://api.github.com/users/mikebronner/repos","events_url":"https://api.github.com/users/mikebronner/events{/privacy}","received_events_url":"https://api.github.com/users/mikebronner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-28T00:51:31Z","updated_at":"2018-07-03T13:50:21Z","closed_at":null,"author_association":"NONE","body":"When creating a new site, it would be great to add a new entry under the \"Language & Framework\" dropdown:\r\n\r\nSwift\r\n - Vapor\r\n\r\n> This can later be expanded to include the following frameworks as we figure out what their needs are:\r\n> - Perfect\r\n> - Kitura\r\n\r\nSetting up a swift web site has specific server requirements:\r\n\r\n### Server\r\n**Distro**\r\n- Ubuntu 16.04 (important, 18.04 does not work yet)\r\n\r\n**Post-Install Script**\r\n```sh\r\nwget -q https://repo.vapor.codes/apt/keyring.gpg -O- | sudo apt-key add -\r\necho \"deb https://repo.vapor.codes/apt $(lsb_release -sc) main\" | sudo tee /etc/apt/sources.list.d/vapor.list\r\napt-get update -y\r\napt-get install swift vapor -y\r\n```\r\n\r\n### Environment Variables\r\n- these will need to be set up (in leu of using a `.env` file) during the site setup process.\r\n\r\n### Cron Jobs\r\nNone needed by default.\r\n\r\n### Daemon\r\nA daemon will need to be set up per site. This will get a bit tricky, but if we can assign each site a numerical ID automatically that corresponds to the internal port being used, with the first site starting at 8080 and incrementing by one for each additional site. The port/site-id will come into play here, as well as in the Nginx configuration file:\r\n\r\n**Command**\r\n```\r\n/home/codepier/<site-folder>/.build/release/Run --hostname 127.0.0.1 --port <site-port>\r\n```\r\n\r\n**Working Directory**\r\n```\r\n/home/codepier/<site-folder>\r\n```\r\n\r\nThe Nginx's `sites-enabled/<site-folder>` file would look like this:\r\n```\r\nserver {\r\n#add ssl redirect and listener on port 443 as well\r\n    listen 80;\r\n    listen [::]:80;\r\n    server_name <site-folder>;\r\n    root /home/codepier/,site-filder>/Public;\r\n\r\n    charset utf-8;\r\n\r\n    location / {\r\n        try_files $uri @proxy;\r\n    }\r\n\r\n    location @proxy {\r\n        proxy_pass http://127.0.0.1:<site-port>;\r\n    }\r\n\r\n    location = /favicon.ico { access_log off; log_not_found off; }\r\n    location = /robots.txt  { access_log off; log_not_found off; }\r\n\r\n    access_log off;\r\n    error_log  /var/log/nginx/vaportest.genealabs.com-error.log error;\r\n\r\n    error_page 404 /index.php;\r\n\r\n    location ~ /\\.(?!well-known).* {\r\n        deny all;\r\n    }\r\n}\r\n```\r\n\r\n### Workers\r\nNone needed by default.\r\n\r\n### Server Files\r\nNone needed by default.\r\n\r\n### Language Settings\r\nNo Swift settings I can think of at this time.\r\n\r\n### Server Features\r\n**Database Features**\r\n- MySQL (optional)\r\n- PostgreSQL (optional)\r\n- Redis (optional, but likely used)\r\n- Memcached (not used, that I know of)\r\n- SqLite (optional)\r\n- MongoDB (optional)\r\n\r\n**Firewall Features**\r\n- Fail2Ban (suggested, to prevent SSH brute force hack attempts)\r\n\r\n**Monitoring Features**\r\n- All (optional, but suggest to have them all)\r\n\r\n**Node Features**\r\n- None (optional, not normally needed, but some workflows may use them)\r\n\r\n**OS Features**\r\n- Swap (default)\r\n- Docker (optional, some workflows will use docker containers to develop swift sites)\r\n\r\n**Repositor Features**\r\n- Git (required)\r\n\r\n**Web Features**\r\n- CertBot (required)\r\n- Nginx (required)\r\n\r\n**Worker Features**\r\n- Beanstalk (optional, probably not used)\r\n- Supervisor (required)\r\n\r\n**PHP Features**\r\n- None\r\n"},"comment":{"url":"https://api.github.com/repos/CodePier/CodePier-Issues/issues/comments/402164333","html_url":"https://github.com/CodePier/CodePier-Issues/issues/2#issuecomment-402164333","issue_url":"https://api.github.com/repos/CodePier/CodePier-Issues/issues/2","id":402164333,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjE2NDMzMw==","user":{"login":"lukepolo","id":2066668,"node_id":"MDQ6VXNlcjIwNjY2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/2066668?v=4","gravatar_id":"","url":"https://api.github.com/users/lukepolo","html_url":"https://github.com/lukepolo","followers_url":"https://api.github.com/users/lukepolo/followers","following_url":"https://api.github.com/users/lukepolo/following{/other_user}","gists_url":"https://api.github.com/users/lukepolo/gists{/gist_id}","starred_url":"https://api.github.com/users/lukepolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukepolo/subscriptions","organizations_url":"https://api.github.com/users/lukepolo/orgs","repos_url":"https://api.github.com/users/lukepolo/repos","events_url":"https://api.github.com/users/lukepolo/events{/privacy}","received_events_url":"https://api.github.com/users/lukepolo/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T13:50:21Z","updated_at":"2018-07-03T13:50:21Z","author_association":"MEMBER","body":"@mikebronner Thanks! No problem, it sounds really doable , Could you get me a list of deployment steps too that you will need to deploy your app? "}}
{"actor":{"display_login":"lukepolo"}}