mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Docker compose don't parse DATABASE_URL_FILE #1826
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 (Jan 22, 2024).
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 (Jan 22, 2024):
Works just fine for me. Can you share your docker-compose.yml relevant parts?
This is what worked for me:
@BlackDex commented on GitHub (Jan 22, 2024):
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.