Discussions
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.```
Posted by Mateo C over 1 year ago
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?
Posted by Arnaud Delevacque over 2 years ago
Permission denied when accessing secrets
I'm using a public container image and am trying to access secrets in the service. I've added secrets to the Docker environment, and then updated the service to use these secrets.
```
Docker secret: FB_TOKEN // ******
Service secret configuration: FB_TOKEN // FB_TOKEN.secret
```
The `FB_TOKEN.secret` file is available at /var/run/secrets/ at runtime but when the application attempts to access the secret, **permission is denied**.
The Dockerfile for the container image has configured:
`USER root`
`USER 1000`
Please advise.
Posted by Marcus Polini about 3 years ago
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!
Posted by Jacob Paquette almost 3 years ago
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.
Posted by Marcus Polini over 2 years ago
Host Wordpress Application
We'd like to migrate our wordpress application over to MedStack Control. How does that work?
Posted by Serene Yeung over 2 years ago
Set up SFTP to transfer files in and out of the Docker environment
How can I setup FTP or SFTP or expose ports on nodes to make this happen?
Posted by Marcus Polini about 3 years ago
Using object storage as a local filesystem
Is it possible to mount a blob as a folder on a container?
Posted by Marcus Polini over 2 years ago
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
Posted by Dom Bavetta almost 2 years ago