Add dms handler
[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       - LOGGING_CONFIG_LEVEL=DEBUG
22     volumes:
23       - ./configs:/configs
24       - ./o2ims:/o2ims
25       - ./o2dms:/o2dms
26       - ./o2common:/o2common
27       - ./tests:/tests
28     entrypoint:
29       - /bin/sh
30       - /tests/o2ims-redis-entry.sh
31
32   api:
33     image: o2imsdms
34     depends_on:
35       - redis_pubsub
36     environment:
37       - DB_HOST=postgres
38       - DB_PASSWORD=o2ims123
39       - API_HOST=api
40       - REDIS_HOST=redis
41       - PYTHONDONTWRITEBYTECODE=1
42       - FLASK_APP=/o2ims/entrypoints/flask_application.py
43       - FLASK_DEBUG=1
44       - PYTHONUNBUFFERED=1
45       - OS_AUTH_URL=${OS_AUTH_URL}
46       - OS_USERNAME=${OS_USERNAME}
47       - OS_PASSWORD=${OS_PASSWORD}
48       - LOGGING_CONFIG_LEVEL=DEBUG
49     volumes:
50       - ./configs:/configs
51       - ./o2ims:/o2ims
52       - ./o2dms:/o2dms
53       - ./o2common:/o2common
54       - ./tests:/tests
55     entrypoint:
56       - flask
57       - run
58       - --host=0.0.0.0
59       - --port=80
60     ports:
61       - "5005:80"
62
63   watcher:
64     build:
65       context: .
66       dockerfile: Dockerfile.localtest
67     image: o2imsdms
68     depends_on:
69       - redis_pubsub
70     environment:
71       - DB_HOST=postgres
72       - DB_PASSWORD=o2ims123
73       - REDIS_HOST=redis
74       - PYTHONDONTWRITEBYTECODE=1
75       - OS_AUTH_URL=${OS_AUTH_URL}
76       - OS_USERNAME=${OS_USERNAME}
77       - OS_PASSWORD=${OS_PASSWORD}
78       - LOGGING_CONFIG_LEVEL=DEBUG
79     volumes:
80       - ./configs:/configs
81       - ./o2ims:/o2ims
82       - ./o2dms:/o2dms
83       - ./o2common:/o2common
84       - ./tests:/tests
85     entrypoint:
86       - /bin/sh
87       - /tests/o2ims-watcher-entry.sh
88
89   postgres:
90     image: postgres:9.6
91     environment:
92       - POSTGRES_USER=o2ims
93       - POSTGRES_PASSWORD=o2ims123
94     ports:
95       - "54321:5432"
96
97   redis:
98     image: redis:alpine
99     ports:
100       - "63791:6379"