Skip to content

Add support to storage_blob_host configuration #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Nov 19, 2024

Conversation

igosneves
Copy link
Contributor

@igosneves igosneves commented Nov 14, 2024

Adding support for configuration storage_blob_host, which makes the gem compatible with azurite. I've adopted this variable name given it is the same supported by azure-storage-blob

I was able to runtime test this in my application's environment, using azure-blob gem. To test this with azurite, the following needs to be done:

  • Run azurite locally. A quick way to have it running locally with docker is:
    docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0 --blobPort 10000
    If you need more configuration options you can check azurite's official documentation here
  • Using Microsoft Azure Storage Explorer, connect to your local azurite and create your container
  • In your application, add new parameter configuration to your relevant config/storage.yaml configuration: storage_blob_host: http://127.0.0.1:10000/devstoreaccount1
  • Run application

@igosneves igosneves mentioned this pull request Nov 14, 2024
@JoeDupuis JoeDupuis merged commit e87667e into testdouble:main Nov 19, 2024
@JoeDupuis
Copy link
Member

Thank you for the contribution!
I made a couple changes to fix some shared access signatures issues and added public container creation to allow running the rails tests on azurite.

@JoeDupuis
Copy link
Member

I'll cut a release shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants