Discussions

Ask a Question
ANSWERED

CORS error when trying to use Azure Storage PUT request from frontend application

I'm trying to do a PUT to azure with axios on React: ``` const url = 'https://{MY-STORAGE-NAME}.blob.core.windows.net/cognito-test-file-container/mateo?sp=racwdl&sv=2018-11-09&sr=c&st=2022-07-04T19%3A52%3A00Z&se=2022-07-08T12%3A00%3A00Z&sip={MY-LOCAL-IP}&spr=https&sig={SECRET}%3D'; const response = await axios.put(url, imagefile?.files?.[0]); ``` But then I get the following CORS error, is there any way I can allow CORS for my local development or any recommended workarounds to PUT a JPG in azure storage? ```Access to XMLHttpRequest at 'https://{MY-STORAGE-NAME}.blob.core.windows.net/cognito-test-file-container/mateo?sp=racwdl&sv=2018-11-09&sr=c&st=2022-07-04T19%3A52%3A00Z&se=2022-07-08T12%3A00%3A00Z&sip={MY-LOCAL-IP}&spr=https&sig={SECRET}%3D' from origin 'https://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.```
ANSWERED

Access Redis service from the exterior

I need my redis service to be reachable by a redis-client not in my cluster. I have created a redis service using the redis:alpine image. I have set a domain name (like redis.blabla.com) and specified the internal port 6379 (I checked, it is the exposed port in the dockerfile) and configured my dns redirection (using the same process as my other services that are using http) I have restarted the load balancer. So now the redis service should be accessible for the other services in the node. But I need to access it from outside as well. When I use redis-cli on my computer, with hostname 'redis.blabla.com' and port 80, it connects, but for any command I receive `Error: Protocol error, got "H" as reply type byte` From my research I understand that maybe the load balancer did not transmit the request with the right protocol, which should be TCP (I think). Is it a use-case already seen? If so, what did I miss?
ANSWERED
ANSWERED

Minio gateway sas token

I'm wanting to use our app's Minio storage gateway to connect to the Azure blob storage however I cannot find a way to have Minio use the generated SAS token. Its wanting the storage account keys which aren't available. Does anyone have experience implementing Minio using Azure blob provided through Medstack? Thanks!
ANSWERED

Connect to a Redis container

How can I get my app service to communicate with my redis service? I currently am setting the `REDIS_URL` in my application to `redis://host.docker.internal:6379/0`, but I can't seem to connect.
ANSWERED
ANSWERED

Host Wordpress Application

We'd like to migrate our wordpress application over to MedStack Control. How does that work?
ANSWERED

Change mongodb default volume mapping

By default, the MongoDB image persists its database under a volume located at `/data/db`. Any idea how I can change this via Medstack control? This is easy enough to configure in a docker-compose file, as represented below. With the following configuration, the MongoDB database gets stored under `/mongodb/data` instead of `/data/db`. I'd like to match this behavior in my MedStack cluster. ``` mongo: container_name: mongo-server image: mongo environment: MONGO_INITDB_ROOT_USERNAME: **** MONGO_INITDB_ROOT_PASSWORD: **** volumes: - /mongodb/data:/data/db ports: - 27017:27017 ``` References: https://www.mongodb.com/compatibility/docker https://hub.docker.com/_/mongo
ANSWERED

Using object storage as a local filesystem

Is it possible to mount a blob as a folder on a container?