cloudserver icon indicating copy to clipboard operation
cloudserver copied to clipboard

Docker compose environment fails with "This service may not be available in the `eu-west-1' region.`" for me

Open zubozrout opened this issue 2 years ago • 0 comments

Hi, this might be an actual issue or more likely just me not understanding how to make this work, but when I try to run my Express.js app locally using docker-compose environment, I am able to connect to localstack (AWS S3 emulation) that is running through Docker. Same goes for another s3 alternative I've tried, even though I've spent a lot of time on making that one work properly. But with zenko/cloudserver I am now most definitely lost.

Having a config like this:

  cloudserver:
    image: zenko/cloudserver:latest
    ports:
      - "8000:8000"
      - "9990:9990"
      - "9991:9991"
    volumes:
      - s3data:/data
      - s3metadata:/metadata
    restart: unless-stopped
    environment:
      - SCALITY_ACCESS_KEY_ID=test
      - SCALITY_SECRET_ACCESS_KEY=test
      - S3DATAPATH=/data
      - S3METADATAPATH=/metadata

volumes:
  s3data:
  s3metadata:

and my Express.js app that is also running as part of this docker-compose.yml file which depends_on: cloudserver I am getting the following error in the console:

A) UnknownEndpoint: Inaccessible host: `cloudserver' at port `8000'. This service may not be available in the `eu-west-1' region. B)

{"name":"S3","time":1658751603984,"error":{"code":"MODULE_NOT_FOUND","requireStack":["/usr/src/app/lib/kms/wrapper.js","/usr/src/app/lib/data/wrapper.js","/usr/src/app/lib/utilities/healthcheckHandler.js","/usr/src/app/lib/utilities/internalHandlers.js","/usr/src/app/lib/server.js","/usr/src/app/index.js"]},"level":"warn","message":"scality kms unavailable. Using file kms backend unless mem specified.","hostname":"ad1ac86529aa","pid":69}
{"name":"MetadataFileServer","time":1658751604032,"error":"Cannot find module 'ioctl' .... "level":"warn","message":"WARNING: Synchronization directory updates are not supported on this platform. Newly written data could be lost if your system crashes before the operating system is able to write directory updates.","hostname":"ad1ac86529aa","pid":111}

For the B part, these are all warnings so I guess they may not be preventing this to work. But I am not sure why A is failing. Accessing http://localhost:8000 in a web browser gives me at a sign the server itself is running though.

Is there anything else needed in order for this to run? I am trying to have a server to connect to and use as a local S3 environment (saving files locally). But unfortunately I seem to be missing something. I've bumped into various resources on this, but most of them just seem out of date, like this one: https://blog.programster.org/deploy-your-own-s3-server

Thank you very much.

zubozrout avatar Jul 25 '22 14:07 zubozrout