DEV Community

Cover image for Learn Docker - from the beginning, part IV docker-compose basics

Learn Docker - from the beginning, part IV docker-compose basics

Chris Noring on February 26, 2019

Follow me on Twitter, happy to take your suggestions on topics or improvements /Chris This article is part of a series: Docker - from the begin...
Collapse
 
bijoy26 profile image
Anjum Rashid

The article link for Microservice over Monolithic Architecture argument is broken now. This is the working link.

Collapse
 
orphee profile image
orphee

Just pointing out 2 misstypings :)

docker stop && docker rm becomes docker-compose-down 

should be

docker stop && docker rm becomes docker-compose down 

and

so full command is now:

docker compose up -d

should be

so full command is now:

docker-compose up -d
Collapse
 
softchris profile image
Chris Noring

Thank you for making this article better. It should be corrected now :)

Collapse
 
vkhang55 profile image
Khang Pham

Great article. Thanks for making it!

Collapse
 
mdaizovi profile image
Mic

Thank you so much for writing this! I am using docker for first time at new job and this explains to me what I'm doing when I paste in my go-to commands.

Collapse
 
softchris profile image
Chris Noring

hi Mic. Really appreciate you writing this comment. This is why I wrote this..

Collapse
 
mkrawczuk profile image
Mateusz Krawczuk

I'd just like to point out that the article is inconsistent about the .yaml and .yml extension in the docker-compose file.

Collapse
 
bmassioui profile image
Bouchaib MASSIOUI

Thanks a lot :)

Collapse
 
thebadcoder profile image
TheBadCoder

Where do I can get the source code for inventory service or shall I just copy some part from product-service where I just get the hello world message?

Collapse
 
softchris profile image
Chris Noring

Here it is

```const express = require('express')
const app = express()
const port = process.env.PORT || 3000;

app.get('/', (req, res) => res.send('Hello inventory service'))```

Collapse
 
thebadcoder profile image
TheBadCoder

Thank you Chris, you are quick😊 I did something similar. Both of my containers are up and running but don't know why I can not access the (localhost:external_port) from my host machine !!

Thread Thread
 
softchris profile image
Chris Noring

are you on windows or mac?

Thread Thread
 
thebadcoder profile image
TheBadCoder

I am using ubuntu.

Collapse
 
uvdepanda profile image
Yubraj Ghimire

I think there is some mismatch with numbering and parts (2 is part IV) 🤔

Collapse
 
softchris profile image
Chris Noring

yea , it's how the series tag is created in dev.to.. No idea how to change. Hopefully, you find your way based on title.

Collapse
 
moatazabdalmageed profile image
Moataz Mohammady

Thanks I just finished part 1 and now reading this amazing one

I created this repo to summarize the series

github.com/MoatazAbdAlmageed/Learn...