forked from datajoint/datajoint-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LNX-docker-compose.yml
102 lines (102 loc) · 2.62 KB
/
LNX-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
# PY_VER=3.8 MYSQL_VER=5.7 DISTRO=alpine MINIO_VER=RELEASE.2022-08-11T04-37-28Z HOST_UID=$(id -u) docker compose -f LNX-docker-compose.yml up --exit-code-from app --build
version: "2.4"
x-net:
&net
networks:
- main
services:
db:
<<: *net
image: datajoint/mysql:${MYSQL_VER}
environment:
- MYSQL_ROOT_PASSWORD=${DJ_PASS}
# ports:
# - "3306:3306"
# volumes:
# - ./mysql/data:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
timeout: 30s
retries: 5
interval: 15s
minio:
<<: *net
image: minio/minio:${MINIO_VER}
environment:
- MINIO_ACCESS_KEY=datajoint
- MINIO_SECRET_KEY=datajoint
# ports:
# - "9000:9000"
# volumes:
# - ./minio/config:/root/.minio
# - ./minio/data:/data
command: server --address ":9000" /data
healthcheck:
test:
[
"CMD",
"curl",
"--fail",
"http://minio:9000/minio/health/live"
]
timeout: 30s
retries: 5
interval: 15s
fakeservices.datajoint.io:
<<: *net
image: datajoint/nginx:v0.2.5
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
# ports:
# - "80:80"
# - "443:443"
# - "3306:3306"
app:
<<: *net
image: datajoint/djtest:py${PY_VER}-${DISTRO}
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
fakeservices.datajoint.io:
condition: service_healthy
environment:
- DJ_HOST=fakeservices.datajoint.io
- DJ_USER=root
- DJ_PASS
- 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
- PYTHON_USER=dja
- JUPYTER_PASSWORD=datajoint
- DISPLAY
working_dir: /src
command:
- sh
- -c
- |
set -e
pip install --user nose nose-cov
pip install -e .
pip list --format=freeze | grep datajoint
pytest -sv --cov-report term-missing --cov=datajoint tests
nosetests -vsw tests_old --with-coverage --cover-package=datajoint
# ports:
# - "8888:8888"
user: ${HOST_UID}:anaconda
volumes:
- .:/src
- /tmp/.X11-unix:/tmp/.X11-unix:rw
# - ./notebooks:/home/dja/notebooks
networks:
main: