Skip to content

Commit

Permalink
Merge pull request #341 from cisagov/bugfix-fix-minio-deployment-and-…
Browse files Browse the repository at this point in the history
…redirect-to-local-s3

Add fixes for minio and redirect s3 client to minio for local dev
  • Loading branch information
schmelz21 authored Jun 27, 2024
2 parents 0fb5d32 + 16ec01c commit 3a0961d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions backend/src/tasks/s3-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ class S3Client {
isLocal: boolean;

constructor(isLocal?: boolean) {
// TODO: Remove once minio service is fixed
// this.isLocal =
// isLocal ??
// (process.env.IS_OFFLINE || process.env.IS_LOCAL ? true : false);
this.isLocal =
isLocal ??
(process.env.IS_OFFLINE || process.env.IS_LOCAL ? true : false);
if (this.isLocal) {
// TODO: Remove once minio service is fixed
// this.s3 = new S3({
// endpoint: 'http://minio:9000',
// s3ForcePathStyle: true
// });
this.s3 = new S3({
endpoint: 'http://minio:9000',
s3ForcePathStyle: true
});
} else {
const agent = new https.Agent({
keepAlive: false
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ services:
- MINIO_ACCESS_KEY=aws_access_key
- MINIO_SECRET_KEY=aws_secret_key
logging:
driver: none
driver: json-file

docs:
build:
Expand Down

0 comments on commit 3a0961d

Please sign in to comment.