Deploy Node.js application with Caddy, Docker & docker-compose on DigitalOcean

Tom Nagle
3 min readMay 9, 2021

In this article, you will learn how to do the easiest Node.js deployment you have ever seen. The application will be deployed with Docker, docker-compose & Caddy Server onto a DigitalOcean droplet.

This guide could be used to deploy a Node.js application onto any VPC, such as Amazon EC2, Linode, even a Raspberry Pi.

GitHub repository: https://github.com/TomDoesTech/caddy-nodejs-docker-tutorial

The diagram below visualizes what you will build as a result of following this guide. Requests will come into the VPC, in this case, a DigitalOcean droplet, they will hit the Docker application running Caddy. Caddy will reverse proxy the request to the Node.js application. The Node.js application will respond and Caddy will forward that request out through port 443.

What is Caddy server and why should I…

--

--

Tom Nagle
Tom Nagle

Written by Tom Nagle

I am a full stack JavaScript developer, living in Melbourne, Australia. My preferred stack is Mongoose, TypeScript, Node.js, React & GraphQL.

No responses yet