Fix client issue
[pti/o2.git] / docker-compose.yml
index 91d3ec8..efb52cf 100644 (file)
@@ -5,7 +5,7 @@ services:
   redis_pubsub:
     build:
       context: .
-      dockerfile: Dockerfile
+      dockerfile: Dockerfile.localtest
     image: o2imsdms-image
     depends_on:
       - postgres
@@ -15,12 +15,17 @@ services:
       - DB_PASSWORD=o2ims123
       - REDIS_HOST=redis
       - PYTHONDONTWRITEBYTECODE=1
+      - OS_AUTH_URL=${OS_AUTH_URL}
+      - OS_USERNAME=${OS_USERNAME}
+      - OS_PASSWORD=${OS_PASSWORD}
     volumes:
-      - ./src:/src
+      - ./o2ims:/o2ims
+      - ./o2dms:/o2dms
+      - ./o2common:/o2common
       - ./tests:/tests
     entrypoint:
-      - python
-      - /src/o2ims/entrypoints/redis_eventconsumer.py
+      - /bin/sh
+      - /o2ims/entrypoints/o2ims-redis-entry.sh
 
   api:
     image: o2imsdms-image
@@ -32,11 +37,16 @@ services:
       - API_HOST=api
       - REDIS_HOST=redis
       - PYTHONDONTWRITEBYTECODE=1
-      - FLASK_APP=o2ims/entrypoints/flask_application.py
+      - FLASK_APP=/o2ims/entrypoints/flask_application.py
       - FLASK_DEBUG=1
       - PYTHONUNBUFFERED=1
+      - OS_AUTH_URL=${OS_AUTH_URL}
+      - OS_USERNAME=${OS_USERNAME}
+      - OS_PASSWORD=${OS_PASSWORD}
     volumes:
-      - ./src:/src
+      - ./o2ims:/o2ims
+      - ./o2dms:/o2dms
+      - ./o2common:/o2common
       - ./tests:/tests
     entrypoint:
       - flask
@@ -46,6 +56,31 @@ services:
     ports:
       - "5005:80"
 
+  watcher:
+    build:
+      context: .
+      dockerfile: Dockerfile.localtest
+    image: o2imsdms-image
+    depends_on:
+      - postgres
+      - redis
+    environment:
+      - DB_HOST=postgres
+      - DB_PASSWORD=o2ims123
+      - REDIS_HOST=redis
+      - PYTHONDONTWRITEBYTECODE=1
+      - OS_AUTH_URL=${OS_AUTH_URL}
+      - OS_USERNAME=${OS_USERNAME}
+      - OS_PASSWORD=${OS_PASSWORD}
+    volumes:
+      - ./o2ims:/o2ims
+      - ./o2dms:/o2dms
+      - ./o2common:/o2common
+      - ./tests:/tests
+    entrypoint:
+      - /bin/sh
+      - /o2ims/entrypoints/o2ims-watcher-entry.sh
+
   postgres:
     image: postgres:9.6
     environment: