2019-05-08 09:38:04 +00:00
|
|
|
# greenlock-storage-s3
|
2019-05-08 09:42:14 +00:00
|
|
|
S3 backed storage strategy for greenlock-express.js (and greenlock.js)
|
2019-05-08 09:52:09 +00:00
|
|
|
|
2019-05-08 10:43:08 +00:00
|
|
|
### Requirements
|
2019-05-08 09:52:09 +00:00
|
|
|
|
|
|
|
- AWS Account
|
|
|
|
- S3 Bucket
|
|
|
|
- Access to S3 Bucket via the AWS CLI (accessKeyId, secretAccessKey)
|
|
|
|
|
|
|
|
For more information see https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html
|
|
|
|
|
2019-05-08 10:43:08 +00:00
|
|
|
### Get started
|
|
|
|
|
|
|
|
Please look at the file `test.js` for an example.
|
|
|
|
|
|
|
|
#### Example using greenlock.
|
|
|
|
|
|
|
|
```nodejs
|
|
|
|
|
|
|
|
var store = require('greenlock-storage-s3').create({
|
|
|
|
debug: false
|
|
|
|
, accessKeyId: // fill-in
|
|
|
|
, secretAccessKey: // fill-in
|
|
|
|
, bucketName: // fill-in
|
|
|
|
, bucketRegion: // fill-in
|
|
|
|
, configDir: 'acme/' // recommended
|
|
|
|
, accountDir: 'accounts/' // recommended
|
|
|
|
})
|
|
|
|
|
|
|
|
var Greenlock = require("greenlock");
|
|
|
|
|
|
|
|
var greenlock = Greenlock.create({
|
|
|
|
// Other options
|
|
|
|
, store: store
|
|
|
|
// Other options
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
|
|
|
### License
|
2019-05-08 09:52:09 +00:00
|
|
|
|
|
|
|
ISC
|