mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-05 13:35:24 +02:00
S3 uploads support (#273)
* finish s3 uploads implementation * remove unnecessary file * fix docs * update DEVELOPMENT.md * update doc * update default uploads path
This commit is contained in:
parent
55b4b3ee61
commit
8c794304b6
16 changed files with 1373 additions and 248 deletions
|
@ -64,3 +64,31 @@ Run it with
|
|||
```shell
|
||||
node bin/db-converter --db-path=./db --mongodb-uri=mongodb://localhost:27017/docs
|
||||
```
|
||||
|
||||
## Using S3 uploads driver
|
||||
|
||||
Uploads driver is used to store files uploaded by users.
|
||||
By default, the application uses local filesystem to store files, but S3 driver is also available.
|
||||
|
||||
### 1. Get credentials for S3 bucket
|
||||
Create a S3 bucket and get access key and secret key (or use existing ones)
|
||||
|
||||
### 2. Setup S3 driver in app-config.local.yaml
|
||||
|
||||
```yaml
|
||||
uploads:
|
||||
driver: "s3"
|
||||
s3:
|
||||
bucket: example.codex.so
|
||||
region: "eu-central-1"
|
||||
baseUrl: "http://example.codex.so.s3-website.eu-central-1.amazonaws.com"
|
||||
keyPrefix: "docs-test"
|
||||
accessKeyId: "<secret>"
|
||||
secretAccessKey: "<secret>
|
||||
```
|
||||
|
||||
### 3. Run the application
|
||||
|
||||
```shell
|
||||
yarn dev
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue