-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathLNX-docker-compose.yaml
123 lines (123 loc) · 4.01 KB
/
LNX-docker-compose.yaml
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
112
113
114
115
116
117
118
119
120
121
122
123
# docker compose -f LNX-docker-compose.yaml --env-file LNX.env up --exit-code-from app --build
version: '2.2'
x-net: &net
networks:
- main
services:
db:
<<: *net
image: datajoint/mysql:${MYSQL_TAG}
environment:
- MYSQL_ROOT_PASSWORD=simple
minio:
<<: *net
environment:
- MINIO_ACCESS_KEY=datajoint
- MINIO_SECRET_KEY=datajoint
image: minio/minio:$MINIO_VER
# ports:
# - "9000:9000"
# To persist MinIO data and config
# volumes:
# - ./minio/data:/data
# - ./minio/config:/root/.minio
command: server /data
healthcheck:
test: ["CMD", "curl", "--fail", "http://minio:9000/minio/health/live"]
timeout: 5s
retries: 60
interval: 1s
fakeservices.datajoint.io:
<<: *net
image: datajoint/nginx:v0.2.4
environment:
- ADD_db_TYPE=DATABASE
- ADD_db_ENDPOINT=db:3306
- ADD_minio_TYPE=MINIO
- ADD_minio_ENDPOINT=minio:9000
- ADD_minio_PORT=80 # allow unencrypted connections
- ADD_minio_PREFIX=/datajoint
- ADD_browser_TYPE=MINIOADMIN
- ADD_browser_ENDPOINT=minio:9000
- ADD_browser_PORT=80 # allow unencrypted connections
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
app:
<<: *net
environment:
- MATLAB_LICENSE
- MATLAB_USER
- DJ_HOST=fakeservices.datajoint.io
- DJ_USER=root
- DJ_PASS=simple
- DJ_TEST_HOST=fakeservices.datajoint.io
- DJ_TEST_USER=datajoint
- DJ_TEST_PASSWORD=datajoint
- S3_ENDPOINT=fakeservices.datajoint.io
- S3_ACCESS_KEY=datajoint
- S3_SECRET_KEY=datajoint
- S3_BUCKET=datajoint.test
image: raphaelguzman/matlab:${MATLAB_VERSION}-MIN
depends_on:
fakeservices.datajoint.io:
condition: service_healthy
user: ${MATLAB_UID}:${MATLAB_GID}
working_dir: /tmp
command:
- /bin/bash
- -c
- |
set -e
export ORIG_DIR=$$(pwd)
mkdir ~/Documents
cd /src
# package into toolbox, and install
matlab -nodisplay -r "
try\
websave([tempdir 'GHToolbox.mltbx'],\
['https://github.com/datajoint/GHToolbox' \
'/releases/download/' subsref(webread(['https://api.github.com/repos' \
'/datajoint/GHToolbox' \
'/releases/latest']),\
substruct('.', 'tag_name')) \
'/GHToolbox.mltbx']);\
matlab.addons.toolbox.installToolbox([tempdir 'GHToolbox.mltbx']);\
fid = fopen('README.md', 'r');\
docs = fread(fid, '*char')';\
fclose(fid);\
ghtb.package('DataJoint',\
'Raphael Guzman',\
['Scientific workflow management framework built on top of a ' \
'relational database.'],\
docs,\
{'.vscode', '.git*', '*.env', '*.yaml', 'tests', 'mym', 'docs-parts',\
'*.txt', '*.prf', '*.md', 'notebook'},\
@() strjoin(arrayfun(@(x) num2str(x),\
cell2mat(struct2cell(dj.version)),\
'uni', false),\
'.'),\
{'+dj', 'erd.m'});\
matlab.addons.toolbox.installToolbox('DataJoint.mltbx');\
cd(getenv('ORIG_DIR'));\
addpath('tests');\
dir(fileparts(which('erd')));\
res=run(Main);\
disp(res);\
if all([res.Passed]) exit, else exit(1), end;\
,\
catch ME,\
disp(getReport(ME, 'extended'));\
exit(1);\
,\
end;\
"
mac_address: $MATLAB_HOSTID
volumes:
- ./tests:/tmp/tests
- .:/src
networks:
main: