diff --git a/packages/s3wrapper/src/s3wrapper/s3_client.py b/packages/s3wrapper/src/s3wrapper/s3_client.py index 7ffc2307d86..981cba36d5e 100644 --- a/packages/s3wrapper/src/s3wrapper/s3_client.py +++ b/packages/s3wrapper/src/s3wrapper/s3_client.py @@ -19,6 +19,8 @@ def __init__(self, endpoint, access_key=None, secret_key=None, secure=False): self.endpoint = endpoint self.access_key = access_key self.secret_key = secret_key + self.secure = secure + self.endpoint_url = ("https://" if secure else "http://") + endpoint try: self.client = Minio(endpoint, access_key=access_key, diff --git a/services/docker-compose.yml b/services/docker-compose.yml index a6847d006b6..54fa59f8e74 100644 --- a/services/docker-compose.yml +++ b/services/docker-compose.yml @@ -247,8 +247,10 @@ services: - MINIO_ACCESS_KEY=12345678 - MINIO_SECRET_KEY=12345678 ports: - - "9000" + - "9001:9000" command: server /data + volumes: + - minio:/data #-------------------------------------------------------------------- maintenance: image: ${DOCKER_REGISTRY:-itisfoundation}/maintenance:${DOCKER_IMAGE_TAG:-latest} @@ -276,3 +278,4 @@ volumes: output: log: postgres: + minio: diff --git a/services/storage/src/simcore_service_storage/dsm.py b/services/storage/src/simcore_service_storage/dsm.py index b9a284d7a8b..8d00ef3fde7 100644 --- a/services/storage/src/simcore_service_storage/dsm.py +++ b/services/storage/src/simcore_service_storage/dsm.py @@ -240,7 +240,7 @@ async def list_files(self, user_id: str, location: str, uuid_filter: str ="", re # MaG: This is inefficient: Do this automatically when file is modified _loop = asyncio.get_event_loop() session = aiobotocore.get_session(loop=_loop) - async with session.create_client('s3', endpoint_url="http://"+self.s3_client.endpoint, aws_access_key_id=self.s3_client.access_key, + async with session.create_client('s3', endpoint_url=self.s3_client.endpoint_url, aws_access_key_id=self.s3_client.access_key, aws_secret_access_key=self.s3_client.secret_key) as client: responses = await asyncio.gather(*[client.list_objects_v2(Bucket=d.bucket_name, Prefix=_d) for _d in [__d.object_name for __d in data]]) for d, resp in zip(data, responses):