diff --git a/assets/run_tests.sh b/assets/run_tests.sh index 552baae..34ff098 100755 --- a/assets/run_tests.sh +++ b/assets/run_tests.sh @@ -46,3 +46,10 @@ RESP2=`curl -I --max-time 2 http://localhost:80/aptly_repo_signing.key 2>/dev/nu [[ $(echo ${RESP2} | grep Content-Length | awk -F ': ' '{print $2}') > 2000 ]] \ && { echo2 "Filesize is ok" "GREEN"; } \ || { echo2 "Error: Filesize is too small" "RED"; exit 1; } + + +RESP3=`curl http://localhost:8080/api/version 2>/dev/null` + +[[ $(echo ${RESP3} | grep "Version") ]] \ + && { echo2 "Aptly is ${RESP3}" "GREEN"; } \ + || { echo2 "Failed to connect to Aptly API" "RED"; exit 1; } diff --git a/assets/supervisord.nginx.conf b/assets/supervisord.nginx.conf index 512cf08..c9a962f 100644 --- a/assets/supervisord.nginx.conf +++ b/assets/supervisord.nginx.conf @@ -4,3 +4,10 @@ command=/usr/sbin/nginx -g "daemon off;" redirect_stderr=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 + +[program:aptly-api] +command=/usr/bin/aptly api serve -listen=:8080 +environment=GIN_MODE=release +redirect_stderr=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0