With web projects running inside Docker containers.

In this article, we are going to:

  • Create custom urls for several web projects, like my-app.local.
  • Set a reverse-proxy to route the requests to these urls to specific Docker containers.
  • Add HTTPS with self-signed certificates.

I tested on Mac. It should work on other platforms, but I didn’t try.

How to setup Docker-compose to isolate a web application

In this article, we are going to

  • Take an existing Node.js / MongoDB application and make it work inside Docker containers.
  • Share content between the host and the container to avoid restarting the container after each modification.

- install Docker on your computer.

The application

As an example, we’ll take a…

How to use pure functions, closures and functions composition

Functional programming is the process of building software by composing pure functions, avoiding shared state, mutable data, and side-effects.

From What is functional programming? by Eric Elliott

Imperative code has a few problems:

  • Functions can rely on external states (variables or functions referenced from a higher scope) which can have…

And a bit of trigonometry

Follow up article: refactor this code with functional programming.

We have an array of tuples representing the points coordinates of a line.

const points = [[5, 10], [10, 40], [40, 30], [60, 5], [90, 45], [120, 10], [150, 45], [200, 10]]

And a Svg element in an HTML page:


Setup a reverse-proxy, and, for each website running inside a Docker container, create an automatic nginx configuration and a SSL certificate.

Let’s see how to:

  • Setup a nginx reverse-proxy and generate a nginx config for each website to link a domain name and a container.
  • Create and renew SSL certificates to enable HTTPS on each website.

- Several websites run inside Docker containers on a single server. (Each one could either…

A complete example

Edit Apr 28, 2018: removed the deprecated links docker-compose instructions.

Let’s make an example which does the following when the server receives a client request:

Architecture overview
  • An nginx reverse-proxy forwards incoming traffic to the appropriate server and directly serves static assets (images and scripts).
  • A Node.js server builds pages with content…

Three steps to configure the deployment process with a Git Hook.

Three steps to configure the deployment process:

1. Create an empty Git repo on the server

2. Write a Git Hook to deploy the code

3. Deploy from the local computer

On the remote server:

# Copy the 'project-create.sh' bash script https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3

François Romain

Freelance developer / designer → http://francoisromain.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store