mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-24 08:12:38 +02:00
Deploy to Heroku without custom buildpack
This commit is contained in:
parent
76efe15472
commit
5a46f542c6
2
Aptfile
Normal file
2
Aptfile
Normal file
@ -0,0 +1,2 @@
|
||||
:repo:deb http://ppa.launchpad.net/dhor/myway/ubuntu xenial main
|
||||
libvips-dev
|
5
app.json
5
app.json
@ -17,8 +17,7 @@
|
||||
}
|
||||
},
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "https://github.com/DarthSim/heroku-buildpack-imgproxy"
|
||||
}
|
||||
{ "url": "https://github.com/heroku/heroku-buildpack-apt" },
|
||||
{ "url": "https://github.com/heroku/heroku-buildpack-go" }
|
||||
]
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
@ -96,6 +97,10 @@ func init() {
|
||||
saltpath := flag.String("saltpath", "", "path of the file with hex-encoded salt")
|
||||
flag.Parse()
|
||||
|
||||
if port := os.Getenv("PORT"); len(port) > 0 {
|
||||
conf.Bind = fmt.Sprintf(":%s", port)
|
||||
}
|
||||
|
||||
strEnvConfig(&conf.Bind, "IMGPROXY_BIND")
|
||||
intEnvConfig(&conf.ReadTimeout, "IMGPROXY_READ_TIMEOUT")
|
||||
intEnvConfig(&conf.WriteTimeout, "IMGPROXY_WRITE_TIMEOUT")
|
||||
|
Loading…
Reference in New Issue
Block a user