So I got Drone working with my Gitea install just recently, but having my Gitea secrets and whatnot in environment variables gives me the heebie jeebies. Is there a way to configure the Drone Docker container using only secrets instead? Right now I’m using secrets to get the data into the container, but then I have to have the entry point script turn them into environment variables.
the Drone server looks for a
.env file to load environment variables. You can probably source the env file from a secret and do something like this:
docker run drone/drone --env-file=/path/to/file
Note the above example does not specify how you get the secret file mounted into the container, which varies based on your orchestration system
Thanks Brad, I’ll look into it.
For the reference of others, I went looking for the --env-file flag after this post and found that support was added in April 2019, from this Github issue: https://github.com/drone/drone/issues/2223