Skip to content
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

Ability to configure server using environment variables #561

Open
lisfox1 opened this issue Aug 26, 2021 · 4 comments
Open

Ability to configure server using environment variables #561

lisfox1 opened this issue Aug 26, 2021 · 4 comments

Comments

@lisfox1
Copy link

lisfox1 commented Aug 26, 2021

When running this service inside a docker container it would be handy to be able to configure it using env vars instead of cli parameters.

@tustvold
Copy link

tustvold commented Sep 2, 2022

This would be especially useful when using Github Actions which for some inexplicable reason do not support passing command line arguments to services - https://github.com/orgs/community/discussions/26688

@mikechernev
Copy link

@fsouza mind if I pick up this issue?

@fsouza
Copy link
Owner

fsouza commented Jan 11, 2023

@fsouza mind if I pick up this issue?

Go for it!

@onarres
Copy link

onarres commented Sep 1, 2023

I created my own docker wrapping the original so I could pass environment variables:

ARG VERSION=1.47.4

# https://github.com/fsouza/fake-gcs-server
FROM fsouza/fake-gcs-server:$VERSION

ENV GCS_SCHEME="http"
ENV GCS_PORT=9010
ENV GCS_URL="http://localhost"

EXPOSE $GCS_PORT

#Remove the original ENTRYPOINT ["/bin/fake-gcs-server", "-data", "/data"] so we can use variables on the CMD and they get interpreted correctly
ENTRYPOINT []

CMD /bin/fake-gcs-server -data "/data" -scheme $GCS_SCHEME -port $GCS_PORT -external-url "$GCS_URL:$GCS_PORT"

I don't know how to add anything to the main repo to easily add this functionality other than creating a separate docker image that supports this.

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