477441a1ac624d33419d195551a48232b68fd5ed
[pti/o2.git] / docker-compose.yml
1 version: "3"
2
3 services:
4
5   redis_pubsub:
6     build:
7       context: .
8       dockerfile: Dockerfile.localtest
9     image: o2imsdms
10     depends_on:
11       - postgres
12       - redis
13     environment:
14       - DB_HOST=postgres
15       - DB_PASSWORD=o2ims123
16       - REDIS_HOST=redis
17       - PYTHONDONTWRITEBYTECODE=1
18       - OS_AUTH_URL=${OS_AUTH_URL}
19       - OS_USERNAME=${OS_USERNAME}
20       - OS_PASSWORD=${OS_PASSWORD}
21       - K8S_KUBECONFIG=${K8S_KUBECONFIG}
22       - K8S_APISERVER=${K8S_APISERVER}
23       - K8S_TOKEN=${K8S_TOKEN}
24       - LOGGING_CONFIG_LEVEL=DEBUG
25     volumes:
26       - ./configs:/configs
27       - ./o2ims:/o2ims
28       - ./o2dms:/o2dms
29       - ./o2common:/o2common
30       - ./o2app:/o2app
31       - ./helm_sdk:/helm_sdk
32       - ./tests:/tests
33     entrypoint:
34       - /bin/sh
35       - /tests/o2app-redis-entry.sh
36
37   api:
38     image: o2imsdms
39     depends_on:
40       - redis_pubsub
41     environment:
42       - DB_HOST=postgres
43       - DB_PASSWORD=o2ims123
44       - API_HOST=api
45       - REDIS_HOST=redis
46       - PYTHONDONTWRITEBYTECODE=1
47       - FLASK_APP=/o2app/entrypoints/flask_application.py
48       - FLASK_DEBUG=1
49       - PYTHONUNBUFFERED=1
50       - OS_AUTH_URL=${OS_AUTH_URL}
51       - OS_USERNAME=${OS_USERNAME}
52       - OS_PASSWORD=${OS_PASSWORD}
53       - LOGGING_CONFIG_LEVEL=DEBUG
54     volumes:
55       - ./configs:/configs
56       - ./o2ims:/o2ims
57       - ./o2dms:/o2dms
58       - ./o2common:/o2common
59       - ./o2app:/o2app
60       - ./helm_sdk:/helm_sdk
61       - ./tests:/tests
62     entrypoint:
63       - /bin/sh
64       - /tests/o2app-api-entry.sh
65     ports:
66       - "5005:80"
67
68   watcher:
69     build:
70       context: .
71       dockerfile: Dockerfile.localtest
72     image: o2imsdms
73     depends_on:
74       - redis_pubsub
75     environment:
76       - DB_HOST=postgres
77       - DB_PASSWORD=o2ims123
78       - REDIS_HOST=redis
79       - PYTHONDONTWRITEBYTECODE=1
80       - OS_AUTH_URL=${OS_AUTH_URL}
81       - OS_USERNAME=${OS_USERNAME}
82       - OS_PASSWORD=${OS_PASSWORD}
83       - LOGGING_CONFIG_LEVEL=DEBUG
84     volumes:
85       - ./configs:/configs
86       - ./o2ims:/o2ims
87       - ./o2dms:/o2dms
88       - ./o2common:/o2common
89       - ./o2app:/o2app
90       - ./helm_sdk:/helm_sdk
91       - ./tests:/tests
92     entrypoint:
93       - /bin/sh
94       - /tests/o2app-watcher-entry.sh
95
96   postgres:
97     image: postgres:9.6
98     environment:
99       - POSTGRES_USER=o2ims
100       - POSTGRES_PASSWORD=o2ims123
101     ports:
102       - "54321:5432"
103
104   redis:
105     image: redis:alpine
106     ports:
107       - "63791:6379"