adhocore/docker-lemp

Add an entry point to populate the mysql database on start

pixeline opened this issue · 1 comments

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.

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/