Browse Source

fix worker depends_on

There was inconsistency in the worker compose yaml for depends_on. The worker requires both db and redis, and in the default docker-compose.yml it was missing db, causing worker to crash on `docker-compose up`. In two other compose files for stacks, where depends_on was used for other services, I added it for the worker to match.
Bret Fisher 5 năm trước cách đây
mục cha
commit
41f2764b94
3 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 1 0
      docker-compose.yml
  2. 3 0
      docker-stack-simple.yml
  3. 3 0
      docker-stack.yml

+ 1 - 0
docker-compose.yml

@@ -29,6 +29,7 @@ services:
       context: ./worker
     depends_on:
       - "redis"
+      - "db"
     networks:
       - back-tier
 

+ 3 - 0
docker-stack-simple.yml

@@ -58,6 +58,9 @@ services:
     networks:
       - frontend
       - backend
+    depends_on:
+      - db
+      - redis
     deploy:
       mode: replicated
       replicas: 1

+ 3 - 0
docker-stack.yml

@@ -56,6 +56,9 @@ services:
     networks:
       - frontend
       - backend
+    depends_on:
+      - db
+      - redis
     deploy:
       mode: replicated
       replicas: 1