refactor(docs): move media guides
The media guides should also live in their own folder like the auth guides do as well Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
committed by
Erik Michelson
parent
814271dc0b
commit
f1070734b1
@@ -44,7 +44,7 @@ to work.*
|
||||
| `dbURL` | `CMD_DB_URL` | **`undefined`**, `postgres://username:password@localhost:5432/hedgedoc`, `mysql://username:password@localhost:3306/hedgedoc`, or `sqlite:///path/to/hedgedoc.db` | Set the db in URL style. If set, then the relevant `db` config entries will be overridden. |
|
||||
| `loglevel` | `CMD_LOGLEVEL` | **`info`**, `debug` ... | Defines what kind of logs are provided to stdout. Available options: `debug`, `verbose`, `info`, `warn`, `error` |
|
||||
| `forbiddenNoteIDs` | `CMD_FORBIDDEN_NOTE_IDS` | **`['robots.txt', 'favicon.ico', 'api', 'build', 'css', 'docs', 'fonts', 'js', 'uploads', 'vendor', 'views']`**, `['robots.txt']` or `'robots.txt'` | disallow creation of notes, even if `allowFreeUrl` or `CMD_ALLOW_FREEURL` is `true` |
|
||||
| `imageUploadType` | `CMD_IMAGE_UPLOAD_TYPE` | **`filesystem`**, `imgur`, `s3`, `minio`, `azure`, `lutim` | Where to upload images. For S3, see our Image Upload Guides for [S3](guides/s3-image-upload.md) or [Minio](guides/minio-image-upload.md), also there's a whole section on their respective env vars below. |
|
||||
| `imageUploadType` | `CMD_IMAGE_UPLOAD_TYPE` | **`filesystem`**, `imgur`, `s3`, `minio`, `azure`, `lutim` | Where to upload images. For S3, see our Image Upload Guides for [S3](guides/media/s3-image-upload.md) or [Minio](guides/media/minio-image-upload.md), also there's a whole section on their respective env vars below. |
|
||||
| `sourceURL` | `CMD_SOURCE_URL` | **no default**, `https://github.com/hedgedoc/hedgedoc/tree/<current commit>` | Provides the link to the source code of HedgeDoc on the entry page (Please, make sure you change this when you run a modified version) |
|
||||
| `tooBusyLag` | `CMD_TOOBUSY_LAG` | **`70`** | CPU time for one event loop tick until node throttles connections. (milliseconds) |
|
||||
| `staticCacheTime` | | **`1 * 24 * 60 * 60 * 1000`** | static file cache time |
|
||||
@@ -273,7 +273,7 @@ you don't have to use either of these.
|
||||
|
||||
| config file | environment | **default** and example value | description |
|
||||
|-----------------|----------------------------|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `s3` | | `{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION" }` | When `imageuploadtype` be set to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](guides/s3-image-upload.md) |
|
||||
| `s3` | | `{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION" }` | When `imageuploadtype` be set to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](guides/media/s3-image-upload.md) |
|
||||
| | `CMD_S3_ACCESS_KEY_ID` | **no default** | AWS access key id |
|
||||
| | `CMD_S3_SECRET_ACCESS_KEY` | **no default** | AWS secret key |
|
||||
| | `CMD_S3_REGION` | **no default**, `ap-northeast-1` | AWS S3 region |
|
||||
@@ -299,7 +299,7 @@ you don't have to use either of these.
|
||||
|
||||
| config file | environment | **default** and example value | description |
|
||||
|-------------|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `minio` | | `{ "accessKey": "YOUR_MINIO_ACCESS_KEY", "secretKey": "YOUR_MINIO_SECRET_KEY", "endpoint": "YOUR_MINIO_HOST", port: 9000, secure: true }` | When `imageUploadType` is set to `minio`, you need to set this key. Also check out our [Minio Image Upload Guide](guides/minio-image-upload.md) |
|
||||
| `minio` | | `{ "accessKey": "YOUR_MINIO_ACCESS_KEY", "secretKey": "YOUR_MINIO_SECRET_KEY", "endpoint": "YOUR_MINIO_HOST", port: 9000, secure: true }` | When `imageUploadType` is set to `minio`, you need to set this key. Also check out our [Minio Image Upload Guide](guides/media/minio-image-upload.md) |
|
||||
| | `CMD_MINIO_ACCESS_KEY` | **no default** | Minio access key |
|
||||
| | `CMD_MINIO_SECRET_KEY` | **no default** | Minio secret key |
|
||||
| | `CMD_MINIO_ENDPOINT` | **no default**, `minio.example.org` | Address of your Minio endpoint/instance |
|
||||
|
||||
@@ -21,22 +21,22 @@
|
||||
docker logs test-minio
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
3. Open <http://localhost:9000> and login with the shown credentials.
|
||||
|
||||

|
||||

|
||||
|
||||
4. Create a bucket for HedgeDoc
|
||||
|
||||

|
||||

|
||||
|
||||
5. Add a policy for the prefix `uploads` and make it read-only.
|
||||
|
||||

|
||||

|
||||
*Open policy editor*
|
||||
|
||||

|
||||

|
||||
*Add policy for uploads*
|
||||
|
||||
6. Set credentials and configs for Minio in HedgeDoc's `config.json`
|
||||
@@ -75,4 +75,4 @@ CMD_S3_BUCKET="your-bucket-name"
|
||||
|
||||
The access key and secret key are the values you received when you enabled the interoperability feature.
|
||||
|
||||
After restarting HedgeDoc you should now be able to add images to your pages.
|
||||
After restarting HedgeDoc you should now be able to add images to your pages.
|
||||
@@ -3,13 +3,13 @@
|
||||
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `HedgeDoc` in your mind 😃 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
|
||||
{
|
||||
@@ -28,13 +28,13 @@
|
||||
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
|
||||
{
|
||||
@@ -70,7 +70,7 @@
|
||||
}
|
||||
```
|
||||
|
||||
9. In additional to edit `config.json` directly, you could also try [environment variables](../configuration.md).
|
||||
9. In additional to edit `config.json` directly, you could also try [environment variables](../../configuration.md).
|
||||
|
||||
## Related Tools
|
||||
|
||||
Reference in New Issue
Block a user