Docker-Compose - Restart my reverse proxy automatically in case of image update

时间:2017-06-15 10:20:35

标签: docker docker-compose

I have a few microservices running and a apache container acting as reverse proxy. I also have CD environment where a git commit for any of the services automatically builds the image and deploys it on my integration environment. However, my reverse proxy container doesn't restarts as it's own configuration or image isn't changed. But without the restart of my reverse proxy, I can't access my microservices.

So, is there a way that I can specify to restart my reverse proxy in case any of my containers are recreated in my compose file. I can write a bash script to restart it of course in case a container is restarted, but I'm looking for more standard way of doing it. All suggestions are welcome. Here is how my compose file looks like -

version: '2'

services:
  portal:
    image: webportal:b203
    container_name: "portal"
    depends_on:
      - paim
      - laim

  laim:
    image: aim-web:b138
    container_name: "laim"

  paim:
    image: aim-backend:b193
    container_name: "paim"

  rp_portal:
    build: httpd:2.4
    container_name: "rp_portal"
    ports:
      - "443:443"
      - "80:80"
    depends_on:
      - portal

0 个答案:

没有答案