From 7894e8c19284664704f512943f3bd07022ba8870 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Fri, 14 Jun 2024 11:04:43 +0000 Subject: [PATCH] Key independent system --- .env.example | 2 +- docker-compose.yml | 6 ++-- src/lib/components/UserAvatar.svelte | 3 +- src/lib/index.ts | 42 ++++++++++++++++++++++++++++ src/lib/server/s3.ts | 10 +++---- src/routes/api/upload/+server.ts | 4 ++- src/routes/profile/+page.svelte | 1 + src/routes/settings/+page.server.ts | 4 +-- 8 files changed, 59 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index 127f3df..3f8841b 100644 --- a/.env.example +++ b/.env.example @@ -5,5 +5,5 @@ DATABASE_URL= AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= -AWS_S3_ENDPOINT= +VITE_AWS_S3_ENDPOINT= AWS_REGION= \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f7fc16e..6a5305a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,9 +11,9 @@ services: - SKIP_DB_WAIT=false - AWS_ACCESS_KEY_ID=minioadmin - AWS_SECRET_ACCESS_KEY=minioadmin - - AWS_S3_ENDPOINT=http://minio:9000 - # MINIO_CLIENT_OVERRIDE: Only necessary if using minio here with this docker compose file. This is becaues the client needs a different endpoint than the server because its not in the docker network. - - MINIO_CLIENT_OVERRIDE=http://localhost:9000 + - VITE_AWS_S3_ENDPOINT=http://minio:9000 + # VITE_MINIO_CLIENT_OVERRIDE: Only necessary if using minio here with this docker compose file. This is becaues the client needs a different endpoint than the server because its not in the docker network. + - VITE_MINIO_CLIENT_OVERRIDE=http://localhost:9000 - BODY_SIZE_LIMIT=Infinity # change this to a smaller value if you want to limit the size of uploaded files! depends_on: diff --git a/src/lib/components/UserAvatar.svelte b/src/lib/components/UserAvatar.svelte index 949b549..0470f9d 100644 --- a/src/lib/components/UserAvatar.svelte +++ b/src/lib/components/UserAvatar.svelte @@ -1,6 +1,7 @@