[Ur] Dockerfile for building Ur/web apps + running on Heroku
Oisín Mac Fhearaí
denpashogai at gmail.com
Sat Sep 14 12:02:09 EDT 2019
While playing around with Heroku, I decided to try their new-ish ability to
build and deploy apps from a Dockerfile, rather than the buildpack method
which has some limitations. Also, I wanted to be able to run a recent
version of Ur/web.
First, I created a Docker image with Ur/web built from master, with
dependencies installed, and pushed it to Docker hub:
https://hub.docker.com/r/destynova/urweb
Then I made a small app that includes a heroku.yml and a Dockerfile that
extends the compiler image in Docker Hub, so pushing with "git push heroku
master" triggers the build and deploy. It takes about 70 seconds for me.
It's a very simplistic app with no database interaction (I configured it to
use a dummy SQLite database with no content). The source is here:
https://github.com/DestyNova/memvalid
It's running on a free Heroku dyno and available here for the time being:
https://memvalid.herokuapp.com/
Might be handy if you're thinking of trying Heroku or any other system that
can deploy from a Docker image.
Oisín
PS. I also noticed while writing the app that Ur/web seems to be lacking
some basic string-handling functions. To get the basic feature of the app
working, I implemented a couple of them that might be good to have in the
stdlib, or maybe could live as a standalone library (I don't know exactly
how this is managed in Ur/web). For example:
fun explode (txt: string) : list char
fun tokens (txt: list char) (p: char -> bool) : list string
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20190914/76ecfb14/attachment.html>
More information about the Ur
mailing list