1
- # 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 local-docker-compose.yml up --build
1
+ # MYSQL_VER=5.7 MINIO_VER=RELEASE.2022-08-11T04-37-28Z docker compose -f local-docker-compose.yml up --build
2
2
version : ' 2.4'
3
- x-net : &net
3
+ x-net :
4
+ &net
4
5
networks :
5
- - main
6
+ - main
6
7
services :
7
8
db :
8
9
<< : *net
@@ -28,23 +29,29 @@ services:
28
29
# - ./minio/config:/root/.minio
29
30
command : server --address ":9000" /data
30
31
healthcheck :
31
- test : ["CMD", "curl", "--fail", "http://minio:9000/minio/health/live"]
32
+ test :
33
+ [
34
+ " CMD" ,
35
+ " curl" ,
36
+ " --fail" ,
37
+ " http://minio:9000/minio/health/live"
38
+ ]
32
39
timeout : 5s
33
40
retries : 60
34
41
interval : 1s
35
42
fakeservices.datajoint.io :
36
43
<< : *net
37
44
image : datajoint/nginx:v0.2.4
38
45
environment :
39
- - ADD_db_TYPE=DATABASE
40
- - ADD_db_ENDPOINT=db:3306
41
- - ADD_minio_TYPE=MINIO
42
- - ADD_minio_ENDPOINT=minio:9000
43
- - ADD_minio_PORT=80 # allow unencrypted connections
44
- - ADD_minio_PREFIX=/datajoint
45
- - ADD_browser_TYPE=MINIOADMIN
46
- - ADD_browser_ENDPOINT=minio:9000
47
- - ADD_browser_PORT=80 # allow unencrypted connections
46
+ - ADD_db_TYPE=DATABASE
47
+ - ADD_db_ENDPOINT=db:3306
48
+ - ADD_minio_TYPE=MINIO
49
+ - ADD_minio_ENDPOINT=minio:9000
50
+ - ADD_minio_PORT=80 # allow unencrypted connections
51
+ - ADD_minio_PREFIX=/datajoint
52
+ - ADD_browser_TYPE=MINIOADMIN
53
+ - ADD_browser_ENDPOINT=minio:9000
54
+ - ADD_browser_PORT=80 # allow unencrypted connections
48
55
ports :
49
56
- " 80:80"
50
57
- " 443:443"
@@ -55,59 +62,5 @@ services:
55
62
condition : service_healthy
56
63
minio :
57
64
condition : service_healthy
58
- app :
59
- << : *net
60
- image : datajoint/djtest:py${PY_VER}-${DISTRO}
61
- depends_on :
62
- fakeservices.datajoint.io :
63
- condition : service_healthy
64
- environment :
65
- - DJ_HOST=fakeservices.datajoint.io
66
- - DJ_USER=root
67
- - DJ_PASS=simple
68
- - DJ_TEST_HOST=fakeservices.datajoint.io
69
- - DJ_TEST_USER=datajoint
70
- - DJ_TEST_PASSWORD=datajoint
71
- # If running tests locally, make sure to add entry in /etc/hosts for 127.0.0.1 fakeservices.datajoint.io
72
- - S3_ENDPOINT=fakeservices.datajoint.io
73
- - S3_ACCESS_KEY=datajoint
74
- - S3_SECRET_KEY=datajoint
75
- - S3_BUCKET=datajoint.test
76
- - PYTHON_USER=dja
77
- - JUPYTER_PASSWORD=datajoint
78
- - DISPLAY
79
- working_dir : /src
80
- command :
81
- - sh
82
- - -c
83
- - |
84
- set -e
85
- pip install --user nose nose-cov
86
- pip install -e .
87
- pip list --format=freeze | grep datajoint
88
- ## You may run the below tests once sh'ed into container i.e. docker exec -it datajoint-python_app_1 sh
89
- # nosetests -vsw tests; #run all tests
90
- # nosetests -vs --tests=tests.test_external_class:test_insert_and_fetch; #run specific basic test
91
- # nosetests -vs --tests=tests.test_fetch:TestFetch.test_getattribute_for_fetch1; #run specific Class test
92
- # flake8 datajoint --count --select=E9,F63,F7,F82 --show-source --statistics
93
- # flake8 --ignore=E203,E722,W503 datajoint --count --max-complexity=62 --max-line-length=127 --statistics
94
- # black datajoint --check -v
95
- ## Remote debugger
96
- set +e
97
- while true
98
- do
99
- python -m ptvsd --host 0.0.0.0 --port 5678 --wait .
100
- sleep 2
101
- done
102
- ports :
103
- - " 8888:8888"
104
- - " 5678:5678"
105
- user : ${HOST_UID}:anaconda
106
- volumes :
107
- - .:/src
108
- - /tmp/.X11-unix:/tmp/.X11-unix:rw
109
- # Additional mounted notebooks may go here
110
- # - ./notebook:/home/dja/notebooks
111
- # - ../dj-python-101/ch1:/home/dja/tutorials
112
65
networks :
113
66
main :
0 commit comments