-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Create multiple users and databases #151
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
Comments
I think recommended way is to create new images based on
Then I have to run my image with additional environment variables: For really massive deployments you can use environment file with |
If you don't want to create a new image, it's also possible to mount the multiple DB creation script directory as a volume, see https://github.com/mrts/docker-postgresql-multiple-databases |
But still guys, why shouldn't we support this feature in this image? |
If you would like to create multiple databases under one user or multiple users, use this script https://github.com/MartinKaburu/docker-postgresql-multiple-databases#using-multiple-databases-with-the-official-postgresql-docker-image |
Why this is not supported in the main image on docker hub? |
How would you use this script in conjunction with a docker volume (which maintaining data persistence)? Honestly, it feels like an ugly solution that quickly shows it's hackyness. |
Is there any chance for this being reopened and improved? |
Short answer, no. |
@yosifkit Could you give an even longer answer, too? Creating a new image is not great. Mounting a file to So why is the resistance to improve this? I am honestly just curious if there is a good reason. |
If anyone needs this, there seems to be this image - |
Hi!
I was wondering on how to create multiple databases with multiple users? As far as I have seen here, currently only one user that has superuser power and the corresponding database can be created trough
POSTGRES_USER
Is creating multiple databases and users currently already possible with the ENV variables? If not, is there another way I can use via docker/docker compose?
The text was updated successfully, but these errors were encountered: