Closed TheBroach closed 1 month ago
Hi! I am trying to use
io.quarkiverse.amazonservices:quarkus-amazon-dynamodb-enhanced
extension and an init script to create a DynamoDB table when I am runningquarkusDev
, but I cannot get it to work...Here is a small MCVE that replicates how I am trying to set it up in my main project.
Thankful for any help, been banging my head against this wall for quite some time...
Make sure the script is runnable. On linux, try chmod +x src/main/resources/scripts/init-localstack.sh
Thanks for the answer! Yes, the file has the permissions -rwxr-xr-x
.
@TheBroach Setting the absolute path to the folder in the application.properties make it works. I guess, gradle handles path differently than maven when it run the process. The mounted path with gradle is ./build/classes/kotlin/main/src/main/resources/scripts
.
Need to find a way to be compatible with both maven and gradle
Passing a relative path like quarkus.aws.devservices.localstack.init-scripts-folder=../../../resources/main/scripts
does the job.
One solution would be to rely on the classloader to get a reliable path to the files, but it would require to extract the resources to a physical temporary directory for docker to be able to mount it. This is not ideal solution either to me.
FYI, while the container is running, I inspect it with docker inspect
to see what is the resolved mounted path.
Thank you so much for the help! Yep, all working now. And thanks for the tip with docker inspect
!
Just to learn, I had a hard time grasping the "location of execution" of the..."thing" that needs this script folder path configuration. Using your relative path example as a hint, I found a suspicious place in the build
folder... Could it be ./build/tmp/quarkusDev
? :)
/build/classes/kotlin/main
I'm no gradle expert but what I experienced is that the working directory is in
Hi! I am trying to use
io.quarkiverse.amazonservices:quarkus-amazon-dynamodb-enhanced
extension and an init script to create a DynamoDB table when I am runningquarkusDev
, but I cannot get it to work...Here is a small MCVE that replicates how I am trying to set it up in my main project.
Thankful for any help, been banging my head against this wall for quite some time...