Optomatica / heroku-julia-sample

A sample project to deploy julia on heroku using julia-buildpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

heroku-julia-sample

A sample project to deploy julia on heroku using julia-buildpack

JuliCon 2019 Presentation Video

Build and Deploy steps

git clone https://github.com/Optomatica/heroku-julia-sample.git
cd heroku-julia-sample
HEROKU_APP_NAME=my-app-name
heroku create $HEROKU_APP_NAME --buildpack https://github.com/Optomatica/heroku-buildpack-julia.git
git push heroku master
heroku open -a $HEROKU_APP_NAME

Server launch must block

If the julia script exits, then the app will shutdown.

This app accomplishes a synchronous (blocking) call to Mux.jl's serve with fetch(serve(test,parse(Int,ARGS[1]))). This ensures julia app.jl $PORT does not quit just after starting about the web server.

If you use another web framework, make sure their serve call also works synchronously.

About

A sample project to deploy julia on heroku using julia-buildpack


Languages

Language:Julia 100.0%