Docs: keep rules of name in the same way
[pti/o2.git] / docker-compose.yml
index 255fbd9..135537e 100644 (file)
@@ -5,27 +5,38 @@ services:
   redis_pubsub:
     build:
       context: .
-      dockerfile: Dockerfile
-    image: o2imsdms-image
+      dockerfile: Dockerfile.localtest
+    image: o2imsdms
     depends_on:
       - postgres
       - redis
     environment:
+      - API_HOST=api
       - 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}
+      - K8S_KUBECONFIG=${K8S_KUBECONFIG}
+      - K8S_APISERVER=${K8S_APISERVER}
+      - K8S_TOKEN=${K8S_TOKEN}
+      - LOGGING_CONFIG_LEVEL=DEBUG
     volumes:
+      - ./configs:/configs
       - ./o2ims:/o2ims
       - ./o2dms:/o2dms
       - ./o2common:/o2common
+      - ./o2app:/o2app
+      - ./helm_sdk:/helm_sdk
       - ./tests:/tests
     entrypoint:
-      - python
-      - /o2ims/entrypoints/redis_eventconsumer.py
+      - /bin/sh
+      - /tests/o2app-redis-entry.sh
 
   api:
-    image: o2imsdms-image
+    image: o2imsdms
     depends_on:
       - redis_pubsub
     environment:
@@ -34,25 +45,80 @@ services:
       - API_HOST=api
       - REDIS_HOST=redis
       - PYTHONDONTWRITEBYTECODE=1
-      - FLASK_APP=/o2ims/entrypoints/flask_application.py
+      - FLASK_APP=/o2app/entrypoints/flask_application.py
       - FLASK_DEBUG=1
       - PYTHONUNBUFFERED=1
-      - STX_AUTH_URL=http://192.168.204.1:5000/v3
-      - STX_USERNAME=admin
-      - STX_PASSWORD=password1
+      - OS_AUTH_URL=${OS_AUTH_URL}
+      - OS_USERNAME=${OS_USERNAME}
+      - OS_PASSWORD=${OS_PASSWORD}
+      - LOGGING_CONFIG_LEVEL=DEBUG
     volumes:
+      - ./configs:/configs
       - ./o2ims:/o2ims
       - ./o2dms:/o2dms
       - ./o2common:/o2common
+      - ./o2app:/o2app
+      - ./helm_sdk:/helm_sdk
       - ./tests:/tests
     entrypoint:
-      - flask
-      - run
-      - --host=0.0.0.0
-      - --port=80
+      - /bin/sh
+      - /tests/o2app-api-entry.sh
     ports:
       - "5005:80"
 
+  watcher:
+    build:
+      context: .
+      dockerfile: Dockerfile.localtest
+    image: o2imsdms
+    depends_on:
+      - redis_pubsub
+    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}
+      - LOGGING_CONFIG_LEVEL=DEBUG
+    volumes:
+      - ./configs:/configs
+      - ./o2ims:/o2ims
+      - ./o2dms:/o2dms
+      - ./o2common:/o2common
+      - ./o2app:/o2app
+      - ./helm_sdk:/helm_sdk
+      - ./tests:/tests
+    entrypoint:
+      - /bin/sh
+      - /tests/o2app-watcher-entry.sh
+
+  mock_smo:
+    build:
+      context: ./mock_smo
+      dockerfile: Dockerfile
+    image: mock-smo
+    depends_on:
+      - mock_smo_redis
+    environment:
+      - API_HOST=api
+      - REDIS_HOST=mock_smo_redis
+      - MOCK_SMO_HOST=mock_smo
+      - PYTHONDONTWRITEBYTECODE=1
+      - FLASK_APP=/mock_smo/entrypoints/mock_smo.py
+      - FLASK_DEBUG=1
+      - PYTHONUNBUFFERED=1
+      - LOGGING_CONFIG_LEVEL=DEBUG
+    volumes:
+      - ./mock_smo/etc:/tmp/etc
+      - ./mock_smo/mock_smo:/mock_smo
+    entrypoint:
+      - /bin/sh
+      - /src/o2app-mock-smo.sh
+    ports:
+      - "5001:80"
+
   postgres:
     image: postgres:9.6
     environment:
@@ -65,3 +131,8 @@ services:
     image: redis:alpine
     ports:
       - "63791:6379"
+
+  mock_smo_redis:
+    image: redis:alpine
+    ports:
+      - "63792:6379"