Running the Notes application with Docker compose

On Windows, we're able to run the commands in this section unchanged.

Before deploying this to a server, let's run it on our laptop using docker-compose:

$ docker stop db-notes userauth db-auth notesapp
db-notes
userauth
db-auth
notesapp
$ docker rm db-notes userauth db-auth notesapp
db-notes
userauth
db-auth
notesapp  

We first needed to stop and delete the existing containers. Because the compose file wants to launch containers with the same names as we'd built earlier, we also have to remove the existing containers:

$ docker-compose build Building db-auth .. lots of output $ docker-compose up Creating db-auth Recreating compose_db-notes_1 Recreating compose_userauth_1 Recreating compose_notesapp_1 ...

Get Node.js Web Development - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.