title: docker-compose keep container running after run entrypoint
body: <p>My <em>docker-compose.yml</em></p>
  
  <pre><code>version: '3.1'
  services:
      redis:
        container_name: redis
        image: redis:3.0
      app_prod:
        container_name: app_prod
        build:
          dockerfile: .docker/app/prod.Dockerfile
          context: ./../
        ports:
            - "8080:80"
        links:
          - mysql:mysql
          - redis:redis
        depends_on:
          - mysql
          - redis
        environment:
          PRODUCTION_MODE: 'true'
        entrypoint: .docker/app/sh/entry-point.sh
      mysql:
        image: mysql
        command: --default-authentication-plugin=mysql_native_password
        restart: always
        environment:
          MYSQL_ROOT_PASSWORD: root
          MYSQL_DATABASE: 'my-db'
        build:
          context: ./mysql # path to folder containing Dockerfile
  </code></pre>
  
  <p>My <em>.docker/app/sh/entry-point.sh</em></p>
  
  <pre><code>#!/usr/bin/env bash
  set -e # exit script if any command fails (non-zero value)
  echo Waiting for redis service start...;
  
  while ! nc -z redis 6379;
  do
  sleep 1;
  done;
  
  echo Waiting for mysql service start...;
  
  while ! nc -z mysql 3306;
  do
  sleep 1;
  done;
  echo Connected!;
  
  php www/index.php orm:schema-tool:update --force
  
  exec "$@"
  </code></pre>
  
  <p>I am building by command:</p>
  
  <p><code>docker-compose -f .docker/docker-compose-prod.yml up -d --build</code></p>
  
  <p>All containers are built successfully but at the end is running <strong>entrypoint</strong> script of container <em>app_prod</em> (<em>.docker/app/sh/entry-point.sh</em>). Entry point script was processed successfully too but after execute entrypoint script is <strong>app_prod</strong> container stopped.</p>
  
  <p>It is some way to keep container running?</p>
  
  <p>Thanks</p>