Containerizing Genie apps with Docker
Docker deployments are the most common way of releasing and scaling web applications as part of DevOps workflows. Genie has official support for Docker containerization via the GenieDeployDocker
plugin. Let’s use it to containerize our app.
We’ll start by adding the GenieDeployDocker
package:
pkg> add GenieDeployDocker
Once installed, we’ll use it to generate a Dockerfile for our application, which is the configuration file that tells Docker how to containerize our app:
julia> using GenieDeployDocker julia> GenieDeployDocker.dockerfile()Docker file successfully written at /path/to/your/app/TodoMVC/Dockerfile
If you’re familiar with Docker, you can take a look at the resulting Dockerfile. Right out of the box, it contains everything that is needed to set up a Linux container with preinstalled Julia, set up our application and its dependencies, and start the server to listen on the designated ports...