Deploying to Fly
Fly applications are deployed with Docker images and they require an additional step to add the private hex repo.
Reference the secrets within in your Dockerfile
by mounting it within a RUN
command:
RUN --mount=type=secret,id=oban_auth_key \
mix hex.repo add oban https://getoban.pro/repo \
--fetch-public-key SHA256:4/OSKi0NRF91QVVXlGAhb/BIMLnK8NHcx/EWs+aIWPc \
--auth-key "$(cat /run/secrets/oban_auth_key)"
Then, if using the Fly CLI to deploy, pass the license through using the --build-secret
flag:
fly deploy --build-secret oban_auth_key=OBAN_AUTH_KEY