From 1d632200d7520919566b739fa86c90671f61ff99 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Mon, 23 Oct 2023 00:55:40 +0000 Subject: [PATCH] chore: use minio as s3 storage for document during development --- .env.example | 12 ++++++------ README.md | 4 +++- docker/compose-services.yml | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 7bd71c04b..f4b7e87aa 100644 --- a/.env.example +++ b/.env.example @@ -22,17 +22,17 @@ E2E_TEST_AUTHENTICATE_USER_PASSWORD="test_password" # [[STORAGE]] # OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3 -NEXT_PUBLIC_UPLOAD_TRANSPORT="database" +NEXT_PUBLIC_UPLOAD_TRANSPORT='s3' # OPTIONAL: Defines the endpoint to use for the S3 storage transport. Relevant when using third-party S3-compatible providers. -NEXT_PRIVATE_UPLOAD_ENDPOINT= +NEXT_PRIVATE_UPLOAD_ENDPOINT="http://127.0.0.1:9002" # OPTIONAL: Defines the region to use for the S3 storage transport. Defaults to us-east-1. -NEXT_PRIVATE_UPLOAD_REGION= +NEXT_PRIVATE_UPLOAD_REGION="unknown" # REQUIRED: Defines the bucket to use for the S3 storage transport. -NEXT_PRIVATE_UPLOAD_BUCKET= +NEXT_PRIVATE_UPLOAD_BUCKET="documenso" # OPTIONAL: Defines the access key ID to use for the S3 storage transport. -NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID= +NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID="documenso" # OPTIONAL: Defines the secret access key to use for the S3 storage transport. -NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY= +NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY="password" # [[SMTP]] # OPTIONAL: Defines the transport to use for sending emails. Available options: smtp-auth (default) | smtp-api | mailchannels diff --git a/README.md b/README.md index f488b4a63..c8f5c5866 100644 --- a/README.md +++ b/README.md @@ -147,11 +147,13 @@ npm run d 1. **App** - http://localhost:3000 2. **Incoming Mail Access** - http://localhost:9000 - 3. **Database Connection Details** + - **Port**: 54320 - **Connection**: Use your favorite database client to connect using the provided port. +4. **S3 Storage Dashboard** - http://localhost:9001 + ## Developer Setup ### Manual Setup diff --git a/docker/compose-services.yml b/docker/compose-services.yml index 67c193dbc..26fe8148a 100644 --- a/docker/compose-services.yml +++ b/docker/compose-services.yml @@ -17,3 +17,20 @@ services: - 9000:9000 - 2500:2500 - 1100:1100 + + minio: + image: minio/minio + container_name: s3 + ports: + - 9002:9002 + - 9001:9001 + volumes: + - minio:/data + environment: + MINIO_ROOT_USER: documenso + MINIO_ROOT_PASSWORD: password + entrypoint: sh + command: -c 'mkdir -p /data/documenso && minio server /data --console-address ":9001" --address ":9002"' + +volumes: + minio: