02190b219c8d88186d7a4690cc8d2f6e1249ca2c
[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-image
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-image
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-image
68     depends_on:
69       - postgres
70       - redis
71     environment:
72       - DB_HOST=postgres
73       - DB_PASSWORD=o2ims123
74       - REDIS_HOST=redis
75       - PYTHONDONTWRITEBYTECODE=1
76       - OS_AUTH_URL=${OS_AUTH_URL}
77       - OS_USERNAME=${OS_USERNAME}
78       - OS_PASSWORD=${OS_PASSWORD}
79       - LOGGING_CONFIG_LEVEL=DEBUG
80     volumes:
81       - ./configs:/configs
82       - ./o2ims:/o2ims
83       - ./o2dms:/o2dms
84       - ./o2common:/o2common
85       - ./tests:/tests
86     entrypoint:
87       - /bin/sh
88       - /tests/o2ims-watcher-entry.sh
89
90   postgres:
91     image: postgres:9.6
92     environment:
93       - POSTGRES_USER=o2ims
94       - POSTGRES_PASSWORD=o2ims123
95     ports:
96       - "54321:5432"
97
98   redis:
99     image: redis:alpine
100     ports:
101       - "63791:6379"