File tree Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,17 @@ jobs:
22
22
- " nodejs"
23
23
- " php"
24
24
- " python"
25
- - " python_sanic"
26
25
- " ruby"
27
26
steps :
28
27
- uses : actions/checkout@v2
29
28
- run : echo 'Run benchmark for ISHOCON2'
29
+ - run : touch /tmp/ishocon-app
30
30
- run : |
31
31
sed -i 's/python/'"$ISHOCON_APP_LANG"'/g' ./docker-compose.yml
32
32
cat ./docker-compose.yml
33
33
make build
34
34
env:
35
35
ISHOCON_APP_LANG: ${{ matrix.language }}
36
- - run : make up && sleep 30
36
+ - run : make up
37
37
- run : make bench
38
38
timeout-minutes : 5
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ services:
6
6
dockerfile : ./docker/app/python/Dockerfile
7
7
environment :
8
8
ISHOCON_APP_LANG : " ${ISHOCON_APP_LANG-python}"
9
+ healthcheck :
10
+ test : ["CMD", "test", "-f", "/tmp/ishocon-app"]
11
+ interval : 30s
12
+ timeout : 3s
13
+ retries : 5
14
+ start_period : 10s
9
15
command : [/home/ishocon/run.sh]
10
16
tty : true
11
17
volumes :
@@ -23,6 +29,9 @@ services:
23
29
- app
24
30
environment :
25
31
- TARGET=app
32
+ depends_on :
33
+ app :
34
+ condition : service_healthy
26
35
27
36
volumes :
28
37
storage_bench :
Original file line number Diff line number Diff line change 10
10
11
11
echo " app_lang: $app_lang "
12
12
13
+ function make_tmp_file() {
14
+ touch /tmp/ishocon-app
15
+ }
16
+
13
17
function run_ruby() {
14
18
cd " /home/ishocon/webapp/$app_lang "
15
19
bundle install
20
+ make_tmp_file
16
21
unicorn -c unicorn_config.rb
17
- echo $check_message
18
22
}
19
23
20
24
function run_python() {
21
25
cd " /home/ishocon/webapp/$app_lang "
26
+ make_tmp_file
22
27
/home/ishocon/.pyenv/shims/uwsgi --ini app.ini
23
28
}
24
29
25
- function run_python_sanic() {
26
- cd " /home/ishocon/webapp/${app_lang} _sanic"
27
- /home/ishocon/.pyenv/shims/uwsgi --ini " app.ini"
28
- }
29
-
30
-
31
30
function run_go() {
32
31
cd " /home/ishocon/webapp/$app_lang "
33
32
go get -t -d -v ./...
34
33
go build -o webapp * .go
34
+ make_tmp_file
35
35
./webapp
36
36
}
37
37
38
38
function run_php() {
39
39
cd " /home/ishocon/webapp/$app_lang "
40
40
sudo mv -f /etc/nginx/nginx.conf /etc/nginx/nginx.conf.orig
41
41
sudo cp webapp/php/php-nginx.conf /etc/nginx/nginx.conf
42
+ make_tmp_file
42
43
sudo service nginx reload
43
44
}
44
45
45
46
function run_crystal() {
46
47
cd " /home/ishocon/webapp/$app_lang "
47
48
shards install
49
+ make_tmp_file
48
50
crystal app.cr
49
51
}
50
52
51
- echo " start running $app_lang app..."
53
+ echo " starting running $app_lang app..."
52
54
" run_${app_lang} "
53
- echo " completed to start running $app_lang app..."
54
-
You can’t perform that action at this time.
0 commit comments