oci-oracle-xe
oci-oracle-xe copied to clipboard
Best practice to migrate DB : Flyway or putting scripts under certain directory ( for example: //container-entrypoint-initdb.d)
- How to Integrate flyway migrate to Oracle XE 18.4 image ?
- What is better way: flyway or copy scripts under /container-entrypoint-initdb.d ? Consideration: use minimal space for images
Hi @rajnishgupta11,
Thanks for using these images!
Unfortunately, I have no experience with Flyway so I can't really comment on how to best integrate with it. Perhaps some users of these images do and can comment.
Hi @gvenzl, Hi @rajnishgupta11,
In these days I was trying to build a pre-packed image, (so: already initialized), in order to reduce startup time. Since my aim was to to use that image with testcontainers for CI.
I added a comment here about how I implemented it: https://github.com/testcontainers/testcontainers-java/issues/1892#issuecomment-1363276807
In my case I'm not using flyway directly but I'm using it wrapped in a .jar file. But on the overall perspective it's not so different.
Inside testcontainer's thread we're discussing about the chance of add a working example in this project's documentation. What is your opinion @gvenzl about that?
I was wondering, would https://github.com/gvenzl/oci-oracle-xe/tree/main/examples be an appropriate location for this? But maybe the example outlined by @Jacopo47 here is already a bit too specific. What were the reasons why you did not use Flyway for this but went for a more custom solution?
@rajnishgupta11 Regarding the original question, just have Flyway interact with the container the same way it would with a more traditionally deployed database. There is no specific integration necessary.
Hey @Jacopo47,
First of all, thanks for using these images! :)
I just read through the threads over at testcontainers and here and I wonder what kind of documentation works best here.
As you already said over at the testcontainers issue, the *-faststart
images already provide a ready-to-go database and thanks to the /container-entrypoint-initdb.d
facility, initialization scripts can be run automatically.
Why is there a need to pull a jar file into the Docker container, I did not quite get that. Could you please elaborate more?
Closing due to lack of activity.