File tree Expand file tree Collapse file tree 3 files changed +23
-11
lines changed Expand file tree Collapse file tree 3 files changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,13 @@ jobs:
27
27
steps :
28
28
- uses : actions/checkout@v2
29
29
- run : echo 'Run benchmark for ISHOCON2'
30
+ - run : touch /tmp/ishocon-app
30
31
- run : |
31
32
sed -i 's/python/'"$ISHOCON_APP_LANG"'/g' ./docker-compose.yml
32
33
cat ./docker-compose.yml
33
34
make build
34
35
env:
35
36
ISHOCON_APP_LANG: ${{ matrix.language }}
36
- - run : make up && sleep 30
37
+ - run : make up
37
38
- run : make bench
38
39
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
+ if [ ! -e /tmp/ishocon-app ]; then
15
+ touch /tmp/ishocon-app
16
+ fi
17
+ }
18
+
13
19
function run_ruby() {
14
20
cd " /home/ishocon/webapp/$app_lang "
15
21
bundle install
22
+ make_tmp_file
16
23
unicorn -c unicorn_config.rb
17
- echo $check_message
18
24
}
19
25
20
26
function run_python() {
21
27
cd " /home/ishocon/webapp/$app_lang "
28
+ make_tmp_file
22
29
/home/ishocon/.pyenv/shims/uwsgi --ini app.ini
23
30
}
24
31
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
32
function run_go() {
32
33
cd " /home/ishocon/webapp/$app_lang "
33
34
go get -t -d -v ./...
34
35
go build -o webapp * .go
36
+ make_tmp_file
35
37
./webapp
36
38
}
37
39
38
40
function run_php() {
39
41
cd " /home/ishocon/webapp/$app_lang "
40
42
sudo mv -f /etc/nginx/nginx.conf /etc/nginx/nginx.conf.orig
41
43
sudo cp webapp/php/php-nginx.conf /etc/nginx/nginx.conf
44
+ make_tmp_file
42
45
sudo service nginx reload
43
46
}
44
47
45
48
function run_crystal() {
46
49
cd " /home/ishocon/webapp/$app_lang "
47
50
shards install
51
+ make_tmp_file
48
52
crystal app.cr
49
53
}
50
54
51
- echo " start running $app_lang app..."
55
+ echo " starting running $app_lang app..."
52
56
" 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