Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUnit does not stop docker-compose's containers #1187

Closed
pavlo opened this issue Mar 26, 2015 · 1 comment
Closed

RUnit does not stop docker-compose's containers #1187

pavlo opened this issue Mar 26, 2015 · 1 comment

Comments

@pavlo
Copy link

pavlo commented Mar 26, 2015

I would like to have a RUnit service to supervise a set of containers launched by docker-compose tool, here's my the runit script:

In /etc/sv/app/run

#!/bin/bash
exec 2>&1

APP_HOME=/home/myapp

source $APP_HOME/env.sh
exec docker-compose -f $APP_HOME/docker-compose.yml up

In docker-compose.yml

rabbitmq:
  build: ./rabbitmq/_image
  environment:
    - RABBITMQ_PASS
    - RABBITMQ_STOMP_CLIENT_NAME
    - RABBITMQ_STOMP_CLIENT_PASS
  ports:
    - "5672:5672"
 mysql:
   build: ./mysql/_image
   volumes_from:
     - mysql_data
  environment:
    - MYSQL_PASS
    - MYSQL_USER
    - MYSQL_DB
    - MYSQL_DB_TEST
  ports:
    - "3306:3306"

Here's what I have then:

  • sv start app - launches the docker-compose thing just fine
  • sv stop app - stops docker-compose process itself but for unknown reason it leaves the containers running

Is there any chance to have the stop command to stop containers as well? I thought that is what docker-compose should do when it gets stopped by RUnit.

@dnephin
Copy link

dnephin commented Sep 28, 2015

Sorry for the slow response. I believe the issue is that docker-compose up expects SIGINT, not SIGTERM to shutdown.

We need to make this work better. I think this is a duplicate of #756. I'm going to close this issue, and track the fix in that issue.

@dnephin dnephin closed this as completed Sep 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants