-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Creation multiple users and databases #240
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Is there anything to be done before this is merged? In case there's a reason this is not going to be merged – what is the official / proper way for adding new users / databases? |
Related issues: docker-library/mysql#213, docker-library/mysql#86, docker-library/mysql#18, MariaDB/mariadb-docker#63, MariaDB/mariadb-docker#15. So, the answer is to just put scripts in |
The official way for adding new users / databases is the same. I didn't broke it. All the environments |
@yosifkit Now I get I'd be able to generate a script before calling docker compose, but having it be more integrated would be nicer. I want to pass some Docker-compose variables to the DB which this PR would enable. I also get you're annoyed having to answer similar questions all the time, but this PR is very much different from anything you're linking and solves a different problem. I hope you can look at it from my perspective and re-evaluate the value of this PR. |
The point @yosifkit is making is that this PR can be implemented entirely as a drop-in script in |
Execute for test:
docker run --name some-postgres -p 5432:5432 -e POSTGRES_USERS="user1:user1pass|user2:user2pass|user3:user3password" -e POSTGRES_DATABASES="database1:user1|database2:user2|database3:user3" -e POSTGRES_CONFIGS="work_mem:15MB|fsync:off|full_page_writes:off" -d xtimon/postgres