Anonymous
×
Create a new article
Write your page title here:
We currently have 27 articles on PhenixOps. Type your article name above or click on one of the titles below and start writing!



PhenixOps
27Articles

Docker Compose: Difference between revisions

Line 38: Line 38:
</code> <br>
</code> <br>


all
All<br>
<code>
<code>
docker compose logs web
docker compose logs web
</code> <br>
</code> <br>


[[Category:Docker]]
[[Category:Docker]]

Revision as of 23:12, 24 April 2020

Docker Compose

Docker Compose can be helpful to scale a container.

Write a Dockerfile

version: '2'
services:
  db:
    image: mongo:latest
    container_name: db
    networks:
      - appnet
  web:
   build: ../.
   networks:
     - appnet
   ports:
    - "3000"
networks:
  appnet:
     driver: bridge


Luanch Docker Compose

docker-compose -d up

Check logs

docker-logs db

docker-logs web

All
docker compose logs web