1
0
Fork 0
mirror of https://github.com/anyproto/any-sync-dockercompose.git synced 2025-06-08 05:47:03 +09:00
This commit is contained in:
Vincent Zhong 2025-05-28 22:29:30 +02:00 committed by GitHub
commit 5a46521d08
Signed by: github
GPG key ID: B5690EEEBB952194

39
docs/s3.md Normal file
View file

@ -0,0 +1,39 @@
## Use AWS S3 (or any other cloud-based S3)
Generally, you need to collect the following information from the S3 service provider for use in the subsequent steps:
- Access Key ID
- Secret Access Key
- Endpoint
- Region name (Some service providers do not require this item, such as Storj)
- Bucket name
There are three files that need to be modified:
- docker-compose.yml
- .env.override
- docker-generateconfig\etc\filenode.yml
Steps:
1. `make down`
2. In [docker-generateconfig\etc\filenode.yml](https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-generateconfig/etc/filenode.yml), replace the endpoint with yours, and comment out or delete "**forcePathStyle**", unless your S3 allows the use of Path Style.
> [!NOTE]
> compare Path Style & Virtual Hosted Style
>
> For example, if you need to access myobject.txt in mybucket.
>
> Path Style:
> `https://region.example.com/mybucket/myobject.txt`
>
> Virtual Hosted Style:
> `https://mybucket.region.example.com/myobject.txt`
3. Specify your current AWS S3 **region** in [docker-generateconfig\etc\filenode.yml](https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-generateconfig/etc/filenode.yml#L6).
4. Specify your valid `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `MINIO_BUCKET` (just use the name AWS S3 bucket) in **.env.override** file.
5. Remove or commented out **minio** and **create-bucket** services from [docker-compose.yml](https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-compose.yml#L56). Remove or commented out [dependency](https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-compose.yml#L127) within any-sync-filenode service.
6. If you have already uploaded files to MINIO previously, you also need to upload the data in the MINIO bucket to the S3 bucket. If you haven't modified the location of the STORAGE_DIR, go to `storage/minio/minio-bucket`, and you can find the previous data. Upload all the files to the S3 bucket.
7. `make start`
Once the files are uploaded to the Anytype space, they will be uploaded to the bucket in encrypted form.