Skip to content
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

Add an entry point to populate the mysql database on start #35

Open
pixeline opened this issue Jul 20, 2022 · 1 comment
Open

Add an entry point to populate the mysql database on start #35

pixeline opened this issue Jul 20, 2022 · 1 comment

Comments

@pixeline
Copy link

Hi!

I would like that on starting the container, if it finds an SQL file in a specific folder, it runs it.
Usually, when using official mariadb / mysql images, I do it by having this volume in my docker-compose for the db service:

volumes:
      - "./data/dumps:/docker-entrypoint-initdb.d"

I tried exactly that with adhocore/docker-lemp:8.0 and it does not seem to work. Is there a way to do that?
Thank you!
Alex.

@adhocore
Copy link
Owner

thank you. :)
that's not already supported. we can try to copy that behavior though which needs some changes in https://github.com/adhocore/docker-lemp/blob/main/docker-entrypoint.sh#L30-L60 if you are interested

and for postgres in https://github.com/adhocore/docker-lemp/blob/main/docker-entrypoint.sh#L30-L60


i would say we should support only *.sql files (in sorted order) from *initdb.d/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants