You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUN ipfs config --json Datastore.Spec "{\"mounts\":[{\"child\":{\"accessKey\":\"${AWS_ACCESS_KEY}\",\"bucket\":\"${AWS_S3_BUCKET}\",\"region\":\"${AWS_REGION}\",\"secretKey\":\"${AWS_SECRET_KEY}\",\"type\":\"s3ds\"},\"mountpoint\":\"/blocks\",\"prefix\":\"s3.datastore\",\"type\":\"measure\"},{\"child\": {\"compression\":\"none\",\"path\":\"datastore\",\"type\":\"levelds\"},\"mountpoint\": \"/\",\"prefix\":\"leveldb.datastore\",\"type\":\"measure\"}],\"type\":\"mount\"}"
69
+
70
+
RUN echo "{\"mounts\":[{\"bucket\":\"${AWS_S3_BUCKET}\",\"mountpoint\":\"/blocks\",\"region\":\"${AWS_REGION}\",\"rootDirectory\":\"\"},{\"mountpoint\":\"/\",\"path\":\"datastore\",\"type\":\"levelds\"}],\"type\":\"mount\"}" > $IPFS_PATH/datastore_spec
71
+
72
+
# by default, run `ipfs daemon` to start as a running node
RUN ipfs config --json Datastore.Spec "{\"mounts\":[{\"child\":{\"accessKey\":\"${AWS_ACCESS_KEY}\",\"bucket\":\"${AWS_S3_BUCKET}\",\"region\":\"${AWS_REGION}\",\"secretKey\":\"${AWS_SECRET_KEY}\",\"type\":\"s3ds\"},\"mountpoint\":\"/blocks\",\"prefix\":\"s3.datastore\",\"type\":\"measure\"},{\"child\": {\"compression\":\"none\",\"path\":\"datastore\",\"type\":\"levelds\"},\"mountpoint\": \"/\",\"prefix\":\"leveldb.datastore\",\"type\":\"measure\"}],\"type\":\"mount\"}"
69
+
RUN echo "{\"mounts\":[{\"bucket\":\"${AWS_S3_BUCKET}\",\"mountpoint\":\"/blocks\",\"region\":\"${AWS_REGION}\",\"rootDirectory\":\"\"},{\"mountpoint\":\"/\",\"path\":\"datastore\",\"type\":\"levelds\"}],\"type\":\"mount\"}" > $IPFS_PATH/datastore_spec
70
+
71
+
# by default, run `ipfs daemon` to start as a running node
Copy file name to clipboardExpand all lines: README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,12 @@ This is an implementation of the datastore interface backed by amazon s3.
6
6
7
7
## Building and Installing
8
8
9
-
You must build the plugin with the *exact* version of go used to build the go-ipfs binary you will use it with. You can find the go version for go-ipfs builds from dist.ipfs.io in the build-info file, e.g. https://dist.ipfs.io/go-ipfs/v0.4.22/build-info or by running `ipfs version --all`.
9
+
You must build the plugin with the _exact_ version of go used to build the go-ipfs binary you will use it with. You can find the go version for go-ipfs builds from dist.ipfs.io in the build-info file, e.g. https://dist.ipfs.io/go-ipfs/v0.4.22/build-info or by running `ipfs version --all`.
10
10
11
11
In addition to needing the exact version of go, you need to build the correct version of this plugin.
12
12
13
-
* To build against a released version of go-ipfs, checkout the `release/v$VERSION` branch and build.
14
-
* To build against a custom (local) build of go-ipfs, run `make IPFS_VERSION=/path/to/go-ipfs/source`.
13
+
- To build against a released version of go-ipfs, checkout the `release/v$VERSION` branch and build.
14
+
- To build against a custom (local) build of go-ipfs, run `make IPFS_VERSION=/path/to/go-ipfs/source`.
15
15
16
16
You can then install it into your local IPFS repo by running `make install`.
17
17
@@ -53,11 +53,12 @@ For a brand new ipfs instance (no data stored yet):
53
53
1. Copy s3plugin.so $IPFS_DIR/plugins/go-ds-s3.so (or run `make install` if you are installing locally).
54
54
2. Run `ipfs init`.
55
55
3. Edit $IPFS_DIR/config to include s3 details (see Configuration below).
56
-
4. Overwrite `$IPFS_DIR/datastore_spec` as specified below (*Don't do this on an instance with existing data - it will be lost*).
56
+
4. Overwrite `$IPFS_DIR/datastore_spec` as specified below (_Don't do this on an instance with existing data - it will be lost_).
57
57
58
58
### Configuration
59
59
60
60
The config file should include the following:
61
+
61
62
```json
62
63
{
63
64
"Datastore": {
@@ -116,7 +117,7 @@ Otherwise, you need to do a datastore migration.
116
117
117
118
## Contribute
118
119
119
-
Feel free to join in. All welcome. Open an [issue](https://github.com/lighthouse-web3/go-ds-s3/issues)!
120
+
Feel free to join in. All welcome. Open an [issue](https://github.com/samperfect/go-ds-s3/issues)!
0 commit comments