Commit 645abb0 1 parent 07a8de7 commit 645abb0 Copy full SHA for 645abb0
File tree 2 files changed +16
-14
lines changed
2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change
1
+
1
2
name : dolos
2
3
version : " 3.9"
3
4
services :
@@ -10,8 +11,8 @@ services:
10
11
networks :
11
12
- dolos
12
13
healthcheck :
13
- start_period : 5s
14
- interval : 10s
14
+ start_period : 2s
15
+ interval : 5s
15
16
test : healthcheck.sh --su-mysql --connect --innodb_initialized
16
17
web :
17
18
image : ghcr.io/dodona-edu/dolos-web
@@ -28,8 +29,8 @@ services:
28
29
networks :
29
30
- dolos
30
31
healthcheck :
31
- start_period : 5s
32
- interval : 10s
32
+ start_period : 2s
33
+ interval : 5s
33
34
test : curl --fail http://localhost:8080 || exit 1
34
35
api :
35
36
image : ghcr.io/dodona-edu/dolos-api
@@ -51,11 +52,12 @@ services:
51
52
RAILS_LOG_TO_STDOUT : true
52
53
SECRET_KEY_BASE_DUMMY : true
53
54
depends_on :
54
- - worker
55
+ db :
56
+ condition : service_healthy
55
57
networks :
56
58
- dolos
57
59
healthcheck :
58
- start_period : 5s
60
+ start_period : 2s
59
61
interval : 10s
60
62
test : curl --fail http://localhost:3000/up || exit 1
61
63
worker :
@@ -74,12 +76,12 @@ services:
74
76
SECRET_KEY_BASE_DUMMY : true
75
77
RAILS_LOG_TO_STDOUT : true
76
78
depends_on :
77
- - db
79
+ - api
78
80
networks :
79
81
- dolos
80
82
healthcheck :
81
- start_period : 5s
82
- interval : 10s
83
+ start_period : 2s
84
+ interval : 5s
83
85
test : ruby -e true || exit 1
84
86
volumes :
85
87
dolos-db-data :
Original file line number Diff line number Diff line change 6
6
docker compose --progress quiet down
7
7
docker compose --progress quiet pull
8
8
docker pull ghcr.io/dodona-edu/dolos-cli:latest
9
- docker compose up # --wait --detach
9
+ docker compose up --wait --detach
10
10
11
11
echo " Upload zipfile"
12
12
13
- upload_response =" $(
13
+ report_url =" $(
14
14
curl -s --fail \
15
15
--form " dataset[name]=Example" \
16
16
--form " dataset[zipfile]=@./samples/javascript/simple-dataset.zip" \
17
- http://localhost:3000/reports
17
+ http://localhost:3000/reports \
18
+ | jq -r ' .url'
18
19
) "
19
20
20
- report_url=" $( echo " $upload_response " | jq -r ' .url' ) "
21
21
22
22
echo " Polling $report_url until finished or failed"
23
23
24
24
while sleep 1; do
25
25
report_json=" $( curl -s --fail " $report_url " ) "
26
- report_status=" $( echo " $report_json " | jq -r ' .status' ) "
26
+ report_status=" $( echo -E " $report_json " | tee /dev/stderr | jq -r ' .status' ) "
27
27
echo " Status is '$report_status '"
28
28
case " $report_status " in
29
29
" queued" | " running" )
You can’t perform that action at this time.
0 commit comments