Distillery & ecto.create


Today I have been looking at understanding release builds in more depth and I have made some progress which is comforting. My Phoenix application is backed by a MYSQL database and I am trying to wrap my head around where the database creation fits into the scheme of things when it comes to deploying my release to my server.

I am using the technique described on this page to allow me to run my migrations on the server I am using for deployment:


This technique is working (for migrations), but I don’t see a mention of ecto.create and I am wondering if it would also be a good idea to include that as a command or whether I should be just manually creating the database on the server before I run migrate and start

Any suggestions / recommendations on which way would be best to head here?


You might find it preferable to create your database outside of Elixir and supply the credentials to your application via environment variables. This will make it much easier to deploy your application in different environments.