Fork me on GitHub
#luminus
<
2017-07-17
>
burke09:07:08

I'm at the point where I want to make my luminus app (compojure+clojurescript+h2db) deployment-ready. I chose Docker as the way to go. I'm not an expert to docker, so I don't really understand, where I should store the db file and where I should run the migrate command when a new version is ready? On the Server I pull the new version from my git repo. I run lein uberjar and then build the dockerfile with the new uberjar in it. Should the migration be done with the uberjar inside the docker container, or should I run lein run migrate to the shared db-file on the server before I create the uberjar/Dockerfile?

donyorm10:07:28

@burke I believe I you can run java -jar <jar name>.jar migrate on the uberjar, but I'm not entirely sure.

burke11:07:43

yes its possible. I didnt know if this should happen on the server or in the container. Now everytime the container starts it migrates the db and starts the application