Fix for local run.

parent 885fd0ab
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
localhost FALSE / FALSE 1540830889 csrftoken MYshXYjSbd6qKAJG3fqkyRUDcCgkM2Od5z1KY5JCyZb5k6PAMxkShf56CaE5xSjL
#HttpOnly_localhost FALSE / FALSE 1510590889 sessionid mwr79uewekos176t3vh16soxmyyehd1o
......@@ -7,11 +7,12 @@ set -ve
if test -f /bin/busybox;then
timeout="timeout -t 10"
else
timeout=timeout
timeout="timeout 10"
fi
# start docker container
docker run --name admin -p 8000:8000 -d admin runuwsgi
docker run --rm --name admin -p 8000:8000 -d admin runuwsgi
trap "docker stop admin&" EXIT
# wait for server to be ready
$timeout /bin/sh -c "while ! curl -sSIk http://localhost:8000 | grep 200\ OK;do sleep 1;done"
......@@ -29,3 +30,5 @@ curl -sI "http://localhost:8000/static/$(curl -s http://localhost:8000/static/CA
# admin login
curl -si --cookie-jar cookie --cookie cookie http://localhost:8000/admin/login/|grep 200\ OK
curl -si --cookie-jar cookie --cookie cookie --data "csrfmiddlewaretoken=$(grep csrftoken cookie | cut -f 7)&username=admin&password=faalkaart" http://localhost:8000/admin/login/|grep 302\ Found
echo "All good!"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment