Closed chadwhitacre closed 7 years ago
pip install virtualenv
pip install --upgrade pip
apt-get install make
make
./update.sh
As with bot
, it's set up to pull from GitHub minutely as part of update.sh
. Pull to deploy, not push.
Rerun of ./update.sh
is fast.
, and it should be installed in cron now ...
$ tail -f /var/log/syslog
...
Oct 17 21:27:01 digitalocean cron[919]: (root) RELOAD (crontabs/root)
Oct 17 21:27:01 digitalocean CRON[24078]: (root) CMD (/root/update-if-needed.sh 2>&1 | logger -t UPDATE-GDR)
👍
Okay! Now to get the webapp installed ...
Pushed 218fd417fd139d95934c1328a7740765b308fefc, waited.
Oct 17 21:34:05 digitalocean UPDATE-GDR: Successfully built 17900867f252
👍
Blech. Figured we'd already have upstart. shrug
apt-get install upstart
Erm, systemd ...
😖
Something! :-)
$ curl http://gdr.rocks/v1 -i -X POST --form "file=@requirements.txt"
HTTP/1.1 100 Continue
HTTP/1.1 500 Internal Server Error
Server: gunicorn/19.6.0
Date: Mon, 17 Oct 2016 21:57:40 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Content-Type: text/plain; charset=UTF-8
Internal server error, program!
$
BLAM!!!!!!!!!!!! Just before was with the requirements.txt for this repo. With a simpler Flask==0.11.1
it works!
$ curl http://gdr.rocks/v1 -i -X POST --form "file=@requirements.txt"
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Server: gunicorn/19.6.0
Date: Mon, 17 Oct 2016 21:59:01 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Content-Type: application/json
[
{
"deps": [
{
"license": "UNKNOWN",
"name": "click",
"version": "6.6"
},
{
"license": "BSD",
"name": "Flask",
"version": "0.11.1"
},
{
"license": "UNKNOWN",
"name": "itsdangerous",
"version": "0.24"
},
{
"license": "BSD",
"name": "Jinja2",
"version": "2.8"
},
{
"license": "BSD",
"name": "MarkupSafe",
"version": "0.23"
},
{
"license": "BSD",
"name": "Werkzeug",
"version": "0.11.11"
}
]
}
]$
Eff it. Added to rc.local
:
make --directory=/root run &
Rebooted a couple times and I think we're good enough for now! 👏
Configured to HUP on pull in 9791ee43de1d01f526c41be3a9e74e1d0c2d661e. Okay!
Calling this deployed. 👍
I suppose we should update the documentation at http://gdr.rocks/, then I think we're pretty close to ready to circle back to https://github.com/gratipay/gratipay.com/pull/4135.
Oh! Also, I gave this a floating IP so we can swap droplets out underneath and not worry about DNS.
We'll probably want some better error handling along the way. :-)
I used the Docker's DO image, which is based on Ubuntu 16.04. Seems to already have
git
.