mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
Move docs into subdirectory to make mkdocs work in a subdirectory
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
(cherry picked from commit eaeb88401d
)
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
1c6da01fa7
commit
b386737d08
97 changed files with 1485 additions and 524 deletions
84
docs/content/guides/s3-image-upload.md
Normal file
84
docs/content/guides/s3-image-upload.md
Normal file
|
@ -0,0 +1,84 @@
|
|||
Guide - Setup CodiMD S3 image upload
|
||||
===
|
||||
|
||||
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
||||
|
||||
1. Go to [AWS S3 console](https://console.aws.amazon.com/s3/home) and create a new bucket.
|
||||
|
||||

|
||||
|
||||
2. Click on bucket, select **Properties** on the side panel, and find **Permission** section. Click **Edit bucket policy**.
|
||||
|
||||

|
||||
|
||||
3. Enter the following policy, replace `bucket_name` with your bucket name:
|
||||
|
||||

|
||||
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Principal": "*",
|
||||
"Action": "s3:GetObject",
|
||||
"Resource": "arn:aws:s3:::bucket_name/uploads/*"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
4. Go to IAM console and create a new IAM user. Remember your user credentials(`key`/`access token`)
|
||||
|
||||
5. Enter user page, select **Permission** tab, look at **Inline Policies** section, and click **Create User Policy**
|
||||
|
||||

|
||||
|
||||
6. Select **Custom Policy**
|
||||
|
||||

|
||||
|
||||
7. Enter the following policy, replace `bucket_name` with your bucket name:
|
||||
|
||||

|
||||
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:*"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::bucket_name/uploads/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
8. Edit `config.json` and set following keys:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"production": {
|
||||
...
|
||||
"imageuploadtype": "s3",
|
||||
"s3": {
|
||||
"accessKeyId": "YOUR_S3_ACCESS_KEY_ID",
|
||||
"secretAccessKey": "YOUR_S3_ACCESS_KEY",
|
||||
"region": "YOUR_S3_REGION" // example: ap-northeast-1
|
||||
},
|
||||
"s3bucket": "YOUR_S3_BUCKET_NAME"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
9. In additional to edit `config.json` directly, you could also try [environment variables](../configuration.md).
|
||||
|
||||
## Related Tools
|
||||
|
||||
* [AWS Policy Generator](http://awspolicygen.s3.amazonaws.com/policygen.html)
|
Loading…
Add table
Add a link
Reference in a new issue