You love new technologies, which are fast and easy to use? Are you looking for possibilities to deploy your apps easily and bleeding fast? Then docker should be your first choice.
With docker, you can easily test new software, test your software with different dependencies and so on.
If you are using docker-compose in addition to docker, the containers are also easy to maintain.
This is why we used a setup with docker in combination with docker-compose for our new technology blog. We installed docker and created our own docker-compose file for ghost.
ghost-loop: image: ifloop/1.0 container_name: ghost-loop volumes: - /docker/files/ifloop/content:/var/lib/ghost/content environment: - VIRTUAL_HOST=blog.ifloop.org - VIRTUAL_PORT=2368 - LETSENCRYPT_HOST=blog.ifloop.org - LETSENCRYPT_EMAILfirstname.lastname@example.org
We mounted the '/var/lib/ghost/content' directory to our host system, as it is preferred since version one of Ghost (before it was '/var/lib/ghost'), to save our data. As we cannot change the url in the content directory (this is directly made in the config.js of ghost), we needed to modify the Dockerfile, which was also very easy.
For our webserver configuration we are using the following images (just if you're interested):
As you can see above in our compose file, we are able to set the virtual host in the environment variable of our docker container. Our blog is now instantly available via HTTPS with a certificate from Lets Encrypt.
As you can see it is very easy to use docker nowadays, there are thousands of blog entries about it, hundreds of tutorials and a great community which will help you if you have a problem, which you can't solve yourself.
Subscribe to ifloop - a developer collective from Innsbruck
Get the latest posts delivered right to your inbox