-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdci.yml
67 lines (67 loc) · 1.73 KB
/
dci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: "3"
services:
minio:
image: quay.io/minio/minio
env_file: .env
ports:
- "9000:9000"
- "9001:9001"
command: server /data --console-address ":9001"
createbuckets:
image: quay.io/minio/mc
env_file: .env
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set dciminio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb dciminio/${STORE_COMPONENTS_CONTAINER};
/usr/bin/mc mb dciminio/${STORE_CONTAINER_BUCKET};
exit 0;
"
db:
image: quay.io/sclorg/postgresql-13-c8s
environment:
- POSTGRESQL_USER=dci
- POSTGRESQL_PASSWORD=dci
- POSTGRESQL_DATABASE=dci
volumes:
- ./dci-db:/opt/app-root/src:Z
tmpfs:
- /var/lib/pgsql/data
ports:
- "5432:5432"
healthcheck:
test: pg_isready -d dci -U dci -h db
interval: 15s
timeout: 5s
retries: 5
api:
build: ${DCI_GIT_REPO_DIR}/dci-control-server
depends_on:
- db
- minio
env_file: .env
ports:
- "5000:5000"
volumes:
- ${DCI_GIT_REPO_DIR}/dci-control-server:/opt/dci-control-server:z
restart: on-failure
healthcheck:
test: curl -sf http://api:5000/api/v1
interval: 15s
timeout: 5s
retries: 5
command: /usr/local/bin/gunicorn -c /etc/gunicorn.conf.py --reload -b 0.0.0.0:5000 dci.app:create_app()
tox:
build: ./dci-tox
env_file: .env
privileged: true
stdin_open: true
tty: true
depends_on:
- api
volumes:
- ${DCI_GIT_REPO_DIR}/python-dciclient:/opt/python-dciclient:z
- ${DCI_GIT_REPO_DIR}/dci-control-server:/opt/dci-control-server:z
- ${DCI_GIT_REPO_DIR}/dci-ansible:/opt/dci-ansible:z