forked from ibpsa/project1-boptest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
111 lines (111 loc) · 3.1 KB
/
docker-compose.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
services:
# A service to provision needed resources during development
# The main task is to upload test cases
# This is not a production container,
# but the "boptest_submit" python module that is executed
# by this service may be useful in provisioning a production environment
provision:
build: service/provision
depends_on:
- web
environment:
- BOPTEST_SERVER
- BOPTEST_DASHBOARD_SERVER
- BOPTEST_DASHBOARD_API_KEY=${BOPTEST_TEST_PRIVILEGED_KEY}
volumes:
- ./:/usr/src/boptest
web: # main boptest application
build:
dockerfile: service/web/Dockerfile
context: .
args:
- NODE_ENV
ports:
- "80:80"
environment:
- NODE_ENV
- BOPTEST_JOB_QUEUE_URL
- BOPTEST_INTERNAL_S3_URL
- BOPTEST_PUBLIC_S3_URL
- BOPTEST_S3_BUCKET
- BOPTEST_REDIS_HOST
- BOPTEST_REGION
- BOPTEST_TIMEOUT
- BOPTEST_MESSAGE_TIMEOUT
- BOPTEST_DASHBOARD_SERVER
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- BOPTEST_USE_TEST_USERS # If "true" the following user accounts will be used for testing
- BOPTEST_TEST_USERNAME # Only for testing
- BOPTEST_TEST_KEY # Only for testing
- BOPTEST_TEST_PRIVILEGED_USERNAME # Only for testing
- BOPTEST_TEST_PRIVILEGED_KEY # Only for testing
depends_on:
- redis
- worker
- mc
# Local implementation of s3
minio:
image: minio/minio
entrypoint:
- minio
- server
- /data
- --console-address
- ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
mc:
image: minio/mc
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc config host add myminio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb myminio/boptest;
/usr/bin/mc anonymous set public myminio/boptest;
/usr/bin/mc anonymous set download myminio/boptest/testcases;
/usr/bin/mc anonymous set download myminio/boptest/tests;
/usr/bin/mc admin user svcacct add --access-key ${AWS_ACCESS_KEY_ID} --secret-key ${AWS_SECRET_ACCESS_KEY} myminio ${MINIO_ROOT_USER};
"
depends_on:
- minio
worker:
build:
dockerfile: service/worker/Dockerfile
context: .
environment:
- BOPTEST_JOB_QUEUE_URL
- BOPTEST_LOGLEVEL
- BOPTEST_INTERNAL_S3_URL
- BOPTEST_S3_BUCKET
- BOPTEST_REDIS_HOST
- BOPTEST_REGION
- BOPTEST_DASHBOARD_SERVER
- BOPTEST_DASHBOARD_API_KEY
- BOPTEST_TIMEOUT
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
depends_on:
- redis
- mc
redis:
image: redis
test:
build:
dockerfile: service/test/Dockerfile
context: .
depends_on:
- web
environment:
- BOPTEST_SERVER
- BOPTEST_DASHBOARD_API_KEY
- BOPTEST_DASHBOARD_USERNAME
- BOPTEST_TEST_USERNAME
- BOPTEST_TEST_KEY
- BOPTEST_TEST_PRIVILEGED_USERNAME
- BOPTEST_TEST_PRIVILEGED_KEY
- BOPTEST_USE_TEST_USERS