{"action":"created","comment":{"url":"https://api.github.com/repos/gomods/athens/pulls/comments/232325447","pull_request_review_id":173484105,"id":232325447,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjMyNTQ0Nw==","diff_hunk":"@@ -0,0 +1,222 @@\n+---\n+title: Configuring Storage\n+description: Configuring Storage in Athens\n+---\n+\n+## Storage\n+\n+The Athens proxy supports many storage types:\n+\n+1. [Memory](#memory)\n+1. [Disk](#disk)\n+1. [Mongo](#mongo)\n+1. [Google Cloud Storage](#google-cloud-storage)\n+1. [AWS S3](#aws-s3)\n+1. [Minio](#minio)\n+1. [DigitalOcean Spaces](#digitalocean-spaces)\n+\n+All of them can be configured using `config` file. You need to set proper driver in `StorageType` value or you can set it in environment variable `ATHENS_STORAGE_TYPE` on your server.\n+Also in most of drivers you need to provide additional configuration data which will be described below.\n+\n+## Memory\n+\n+This storage don't need any specific configuration and it's also used by default in Athens project. It writes all of data into local disk into `tmp` dir.\n+\n+**This storage type should only be used for development purpose!**\n+\n+##### config:\n+\n+    # StorageType sets the type of storage backend the proxy will use.\n+    # Env override: ATHENS_STORAGE_TYPE\n+    StorageType = \"memory\"\n+    \n+## Disk\n+\n+Disk storage allows modules to be stored on a file system. The location on disk where modules will be stored can be configured.\n+\n+##### config:\n+\n+    # StorageType sets the type of storage backend the proxy will use.\n+    # Env override: ATHENS_STORAGE_TYPE\n+    StorageType = \"disk\"\n+    \n+    [Storage]\n+        [Storage.Disk]\n+            RootPath = \"/path/on/disk\"\n+            \n+where `/path/on/disk` is your desired location. Also it can be set using `ATHENS_DISK_STORAGE_ROOT` env\n+\n+## Mongo\n+\n+This driver is using [Mongo](https://www.mongodb.com/) server as data storage. On start this driver will create `athens` database and `module` collection inside your mongo server.\n+\n+##### config:\n+\n+    # StorageType sets the type of storage backend the proxy will use.\n+    # Env override: ATHENS_STORAGE_TYPE\n+    StorageType = \"mongo\"\n+    \n+    [Storage]\n+        [Storage.Mongo]\n+            # Full URL for mongo storage\n+            # Env override: ATHENS_MONGO_STORAGE_URL\n+            URL = \"mongodb://127.0.0.1:27017\"\n+    \n+            # Not required parameter\n+            # Path to certificate to use for the mongo connection\n+            # Env override: ATHENS_MONGO_CERT_PATH\n+            CertPath = \"/path/to/cert/file\"\n+    \n+            # Timeout for networks calls made to Mongo in seconds\n+            # Defaults to Global Timeout\n+            # Env override: MONGO_CONN_TIMEOUT_SEC\n+            Timeout = 300\n+    \n+            # Not required parameter\n+            # Allows for insecure SSL / http connections to mongo storage\n+            # Should be used for testing or development only\n+            # Env override: ATHENS_MONGO_INSECURE\n+            Insecure = false                    \n+            \n+## Google Cloud Storage\n+\n+This driver is using [Google Object Storage](https://cloud.google.com/storage/) and assumes that you already have `account` in it. \n+GCP driver at start will try to create `bucket` in which Athens data will be stored.\n+\n+##### config:\n+\n+    # StorageType sets the type of storage backend the proxy will use.\n+    # Env override: ATHENS_STORAGE_TYPE\n+    StorageType = \"gcp\"\n+    \n+    [Storage]\n+        [Storage.GCP]\n+            # ProjectID to use for GCP Storage\n+            # Env overide: GOOGLE_CLOUD_PROJECT\n+            ProjectID = \"YOUR_GCP_PROJECT_ID\"\n+    \n+            # Bucket to use for GCP Storage\n+            # Env override: ATHENS_STORAGE_GCP_BUCKET\n+            Bucket = \"YOUR_GCP_BUCKET\"\n+    \n+            # Timeout for networks calls made to GCP in seconds\n+            # Defaults to Global Timeout\n+            Timeout = 300\n+            \n+## AWS S3\n+\n+This driver is using [AWS S3](https://aws.amazon.com/s3/) and assumes that you already have `account` and `bucket` created in it. \n+If you never used Amazon Cloud services there is [quick guide](https://docs.aws.amazon.com/AmazonS3/latest/gsg/GetStartedWithS3.html) how to create `bucket` inside it.\n+After this you can pass you credentials inside `config` file","path":"docs/content/configuration/storage.md","position":110,"original_position":110,"commit_id":"01465071ed475ec0efe9ce036f38bf93cb9691b8","original_commit_id":"01465071ed475ec0efe9ce036f38bf93cb9691b8","user":{"login":"robjloranger","id":13278126,"node_id":"MDQ6VXNlcjEzMjc4MTI2","avatar_url":"https://avatars0.githubusercontent.com/u/13278126?v=4","gravatar_id":"","url":"https://api.github.com/users/robjloranger","html_url":"https://github.com/robjloranger","followers_url":"https://api.github.com/users/robjloranger/followers","following_url":"https://api.github.com/users/robjloranger/following{/other_user}","gists_url":"https://api.github.com/users/robjloranger/gists{/gist_id}","starred_url":"https://api.github.com/users/robjloranger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robjloranger/subscriptions","organizations_url":"https://api.github.com/users/robjloranger/orgs","repos_url":"https://api.github.com/users/robjloranger/repos","events_url":"https://api.github.com/users/robjloranger/events{/privacy}","received_events_url":"https://api.github.com/users/robjloranger/received_events","type":"User","site_admin":false},"body":"This one too, maybe the full filename.","created_at":"2018-11-09T17:05:40Z","updated_at":"2018-11-09T17:32:40Z","html_url":"https://github.com/gomods/athens/pull/883#discussion_r232325447","pull_request_url":"https://api.github.com/repos/gomods/athens/pulls/883","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gomods/athens/pulls/comments/232325447"},"html":{"href":"https://github.com/gomods/athens/pull/883#discussion_r232325447"},"pull_request":{"href":"https://api.github.com/repos/gomods/athens/pulls/883"}}},"pull_request":{"url":"https://api.github.com/repos/gomods/athens/pulls/883","id":229531599,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NTMxNTk5","html_url":"https://github.com/gomods/athens/pull/883","diff_url":"https://github.com/gomods/athens/pull/883.diff","patch_url":"https://github.com/gomods/athens/pull/883.patch","issue_url":"https://api.github.com/repos/gomods/athens/issues/883","number":883,"state":"open","locked":false,"title":"Add docs about storages in athens","user":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"body":"**What is the problem I am trying to address?**\r\n\r\nMissing docs page about storages in athen. \r\n\r\n**How is the fix applied?**\r\n\r\nCreated docs page under docs `configuration` section about storages in Athens and their corresponding configurations. \r\n\r\n**Mention the issue number it fixes or add the details of the changes if it doesn't have a specific issue.**\r\n\r\nFixes #848 \r\n","created_at":"2018-11-08T22:37:19Z","updated_at":"2018-11-09T17:32:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"966d7954787632f5f7caed4db0300b818c2abae9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gomods/athens/pulls/883/commits","review_comments_url":"https://api.github.com/repos/gomods/athens/pulls/883/comments","review_comment_url":"https://api.github.com/repos/gomods/athens/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gomods/athens/issues/883/comments","statuses_url":"https://api.github.com/repos/gomods/athens/statuses/01465071ed475ec0efe9ce036f38bf93cb9691b8","head":{"label":"t-tomalak:848-storage-docs","ref":"848-storage-docs","sha":"01465071ed475ec0efe9ce036f38bf93cb9691b8","user":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"repo":{"id":151239225,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEyMzkyMjU=","name":"athens","full_name":"t-tomalak/athens","private":false,"owner":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"html_url":"https://github.com/t-tomalak/athens","description":"A Go module datastore and proxy","fork":true,"url":"https://api.github.com/repos/t-tomalak/athens","forks_url":"https://api.github.com/repos/t-tomalak/athens/forks","keys_url":"https://api.github.com/repos/t-tomalak/athens/keys{/key_id}","collaborators_url":"https://api.github.com/repos/t-tomalak/athens/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/t-tomalak/athens/teams","hooks_url":"https://api.github.com/repos/t-tomalak/athens/hooks","issue_events_url":"https://api.github.com/repos/t-tomalak/athens/issues/events{/number}","events_url":"https://api.github.com/repos/t-tomalak/athens/events","assignees_url":"https://api.github.com/repos/t-tomalak/athens/assignees{/user}","branches_url":"https://api.github.com/repos/t-tomalak/athens/branches{/branch}","tags_url":"https://api.github.com/repos/t-tomalak/athens/tags","blobs_url":"https://api.github.com/repos/t-tomalak/athens/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/t-tomalak/athens/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/t-tomalak/athens/git/refs{/sha}","trees_url":"https://api.github.com/repos/t-tomalak/athens/git/trees{/sha}","statuses_url":"https://api.github.com/repos/t-tomalak/athens/statuses/{sha}","languages_url":"https://api.github.com/repos/t-tomalak/athens/languages","stargazers_url":"https://api.github.com/repos/t-tomalak/athens/stargazers","contributors_url":"https://api.github.com/repos/t-tomalak/athens/contributors","subscribers_url":"https://api.github.com/repos/t-tomalak/athens/subscribers","subscription_url":"https://api.github.com/repos/t-tomalak/athens/subscription","commits_url":"https://api.github.com/repos/t-tomalak/athens/commits{/sha}","git_commits_url":"https://api.github.com/repos/t-tomalak/athens/git/commits{/sha}","comments_url":"https://api.github.com/repos/t-tomalak/athens/comments{/number}","issue_comment_url":"https://api.github.com/repos/t-tomalak/athens/issues/comments{/number}","contents_url":"https://api.github.com/repos/t-tomalak/athens/contents/{+path}","compare_url":"https://api.github.com/repos/t-tomalak/athens/compare/{base}...{head}","merges_url":"https://api.github.com/repos/t-tomalak/athens/merges","archive_url":"https://api.github.com/repos/t-tomalak/athens/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/t-tomalak/athens/downloads","issues_url":"https://api.github.com/repos/t-tomalak/athens/issues{/number}","pulls_url":"https://api.github.com/repos/t-tomalak/athens/pulls{/number}","milestones_url":"https://api.github.com/repos/t-tomalak/athens/milestones{/number}","notifications_url":"https://api.github.com/repos/t-tomalak/athens/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/t-tomalak/athens/labels{/name}","releases_url":"https://api.github.com/repos/t-tomalak/athens/releases{/id}","deployments_url":"https://api.github.com/repos/t-tomalak/athens/deployments","created_at":"2018-10-02T10:47:12Z","updated_at":"2018-10-02T10:47:15Z","pushed_at":"2018-11-09T15:04:50Z","git_url":"git://github.com/t-tomalak/athens.git","ssh_url":"git@github.com:t-tomalak/athens.git","clone_url":"https://github.com/t-tomalak/athens.git","svn_url":"https://github.com/t-tomalak/athens","homepage":"https://docs.gomods.io","size":52168,"stargazers_count":0,"watchers_count":0,"language":"Go","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gomods:master","ref":"master","sha":"0415934fd11ff42c7cb9e139d47b97a8d42c73b8","user":{"login":"gomods","id":36861827,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2ODYxODI3","avatar_url":"https://avatars3.githubusercontent.com/u/36861827?v=4","gravatar_id":"","url":"https://api.github.com/users/gomods","html_url":"https://github.com/gomods","followers_url":"https://api.github.com/users/gomods/followers","following_url":"https://api.github.com/users/gomods/following{/other_user}","gists_url":"https://api.github.com/users/gomods/gists{/gist_id}","starred_url":"https://api.github.com/users/gomods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomods/subscriptions","organizations_url":"https://api.github.com/users/gomods/orgs","repos_url":"https://api.github.com/users/gomods/repos","events_url":"https://api.github.com/users/gomods/events{/privacy}","received_events_url":"https://api.github.com/users/gomods/received_events","type":"Organization","site_admin":false},"repo":{"id":122872932,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI4NzI5MzI=","name":"athens","full_name":"gomods/athens","private":false,"owner":{"login":"gomods","id":36861827,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2ODYxODI3","avatar_url":"https://avatars3.githubusercontent.com/u/36861827?v=4","gravatar_id":"","url":"https://api.github.com/users/gomods","html_url":"https://github.com/gomods","followers_url":"https://api.github.com/users/gomods/followers","following_url":"https://api.github.com/users/gomods/following{/other_user}","gists_url":"https://api.github.com/users/gomods/gists{/gist_id}","starred_url":"https://api.github.com/users/gomods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomods/subscriptions","organizations_url":"https://api.github.com/users/gomods/orgs","repos_url":"https://api.github.com/users/gomods/repos","events_url":"https://api.github.com/users/gomods/events{/privacy}","received_events_url":"https://api.github.com/users/gomods/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gomods/athens","description":"A Go module datastore and proxy","fork":false,"url":"https://api.github.com/repos/gomods/athens","forks_url":"https://api.github.com/repos/gomods/athens/forks","keys_url":"https://api.github.com/repos/gomods/athens/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gomods/athens/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gomods/athens/teams","hooks_url":"https://api.github.com/repos/gomods/athens/hooks","issue_events_url":"https://api.github.com/repos/gomods/athens/issues/events{/number}","events_url":"https://api.github.com/repos/gomods/athens/events","assignees_url":"https://api.github.com/repos/gomods/athens/assignees{/user}","branches_url":"https://api.github.com/repos/gomods/athens/branches{/branch}","tags_url":"https://api.github.com/repos/gomods/athens/tags","blobs_url":"https://api.github.com/repos/gomods/athens/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gomods/athens/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gomods/athens/git/refs{/sha}","trees_url":"https://api.github.com/repos/gomods/athens/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gomods/athens/statuses/{sha}","languages_url":"https://api.github.com/repos/gomods/athens/languages","stargazers_url":"https://api.github.com/repos/gomods/athens/stargazers","contributors_url":"https://api.github.com/repos/gomods/athens/contributors","subscribers_url":"https://api.github.com/repos/gomods/athens/subscribers","subscription_url":"https://api.github.com/repos/gomods/athens/subscription","commits_url":"https://api.github.com/repos/gomods/athens/commits{/sha}","git_commits_url":"https://api.github.com/repos/gomods/athens/git/commits{/sha}","comments_url":"https://api.github.com/repos/gomods/athens/comments{/number}","issue_comment_url":"https://api.github.com/repos/gomods/athens/issues/comments{/number}","contents_url":"https://api.github.com/repos/gomods/athens/contents/{+path}","compare_url":"https://api.github.com/repos/gomods/athens/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gomods/athens/merges","archive_url":"https://api.github.com/repos/gomods/athens/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gomods/athens/downloads","issues_url":"https://api.github.com/repos/gomods/athens/issues{/number}","pulls_url":"https://api.github.com/repos/gomods/athens/pulls{/number}","milestones_url":"https://api.github.com/repos/gomods/athens/milestones{/number}","notifications_url":"https://api.github.com/repos/gomods/athens/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gomods/athens/labels{/name}","releases_url":"https://api.github.com/repos/gomods/athens/releases{/id}","deployments_url":"https://api.github.com/repos/gomods/athens/deployments","created_at":"2018-02-25T20:19:41Z","updated_at":"2018-11-09T13:59:36Z","pushed_at":"2018-11-09T15:04:52Z","git_url":"git://github.com/gomods/athens.git","ssh_url":"git@github.com:gomods/athens.git","clone_url":"https://github.com/gomods/athens.git","svn_url":"https://github.com/gomods/athens","homepage":"https://docs.gomods.io","size":52131,"stargazers_count":1205,"watchers_count":1205,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":129,"mirror_url":null,"archived":false,"open_issues_count":81,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":129,"open_issues":81,"watchers":1205,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gomods/athens/pulls/883"},"html":{"href":"https://github.com/gomods/athens/pull/883"},"issue":{"href":"https://api.github.com/repos/gomods/athens/issues/883"},"comments":{"href":"https://api.github.com/repos/gomods/athens/issues/883/comments"},"review_comments":{"href":"https://api.github.com/repos/gomods/athens/pulls/883/comments"},"review_comment":{"href":"https://api.github.com/repos/gomods/athens/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gomods/athens/pulls/883/commits"},"statuses":{"href":"https://api.github.com/repos/gomods/athens/statuses/01465071ed475ec0efe9ce036f38bf93cb9691b8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"robjloranger"}}