mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-11 09:13:02 +03:00
Docker compose don't parse DATABASE_URL_FILE #582
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thejoelinux on GitHub.
Subject of the issue
We are trying to deploy the docker container in a Docker Swarm.
As the DATABASE_URL contains a password, we try to pass it via a DATABASE_URL_FILE env variable, but it is not parsed.
At the same time, when DATABASE_URL_FILE and DATABASE_URL are both defined, it throws an error.
Deployment environment
Docker swarm, vault-warden on MariaDB.
Steps to reproduce
Put the DATABASE_URL in a secret file (i.e. /run/secrets/database_url_secret), or a config...
Set DATABASE_URL_FILE=/run/secrets/database_url_secret
Expected behaviour
Vault connect to the database using the URL in the DATABASE_URL_FILE
Actual behaviour
The container don't start, complaining the database is not found.
@BlackDex commented on GitHub:
Works just fine for me. Can you share your docker-compose.yml relevant parts?
This is what worked for me:
@BlackDex commented on GitHub:
Also, the error message when you define both specifically states to not define both.
That is as intended, and the message seems to be clearly stating what the issue is and how to resolve it.