Augustin Riedinger
Augustin Riedinger

Reputation: 22270

Docker-compose Daemon mode logs

I'm running several containers in daemon mode: docker-compose up -d.

One of them recently crashed.

I'd like to investigate what happened. Where can I find the app logs?

Here's the docker-compose.yml (nothing special regarding logging):

mongodb:
  image: mongo
  command: "--smallfiles --logpath=/dev/null"
web:
  build: .
  command: npm start
  volumes:
    - .:/myapp
  ports:
    - "3001:3000"
  links:
    - mongodb
  environment:
    PORT: 3000
    NODE_ENV: 'production'
seed:
 build: ./seed
 links:
   - mongodb

Upvotes: 2

Views: 1058

Answers (1)

denov
denov

Reputation: 12726

You can get logs via docker-compose logs or you could exec to attach (docker >= 1.3) to the running instance via

$ docker exec -i -t 6655b41beef /bin/bash #by ID
or
$ docker exec -i -t my_www /bin/bash #by Name

Upvotes: 1

Related Questions