mirror of
https://github.com/willnorris/imageproxy.git
synced 2024-12-16 21:56:43 -05:00
remove goxc stuff and update deploy docs
I don't use goxc anymore, and it hasn't been an active project in a really long time, so there's no need in referencing it.
This commit is contained in:
parent
4aa8e01f60
commit
955ea12402
3 changed files with 11 additions and 56 deletions
18
.goxc.json
18
.goxc.json
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"ArtifactsDest": "build",
|
||||
"PackageVersion": "0.6.0",
|
||||
"TaskSettings": {
|
||||
"pkg-build": {
|
||||
"metadata": {
|
||||
"description": "image proxy server",
|
||||
"long-description": " imageproxy is a caching image proxy server",
|
||||
"maintainer": "Will Norris",
|
||||
"maintainer-email": "will@willnorris.com"
|
||||
},
|
||||
"metadata-deb": {
|
||||
"Homepage": "https://willnorris.com/go/imageproxy"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ConfigVersion": "0.9"
|
||||
}
|
31
README.md
31
README.md
|
@ -224,30 +224,17 @@ needs... it's a very simple command.
|
|||
|
||||
## Deploying ##
|
||||
|
||||
You can build and deploy imageproxy using any standard go toolchain, but here's
|
||||
how I do it.
|
||||
In most cases, you can follow the normal procedure for building a deploying any
|
||||
go application. For example, I build it directly on my production debian server
|
||||
using:
|
||||
|
||||
I use [goxc](https://github.com/laher/goxc) to build and deploy to an Ubuntu
|
||||
server. I have a `$GOPATH/willnorris.com/go/imageproxy/.goxc.local.json` file
|
||||
which limits builds to 64-bit linux:
|
||||
- `go build willnorris.com/go/imageproxy/cmd/imageproxy`
|
||||
- copy resulting binary to `/usr/local/bin`
|
||||
- copy [`etc/imageproxy.service`](etc/imageproxy.service) to
|
||||
`/lib/systemd/system` and enable using `systemctl`.
|
||||
|
||||
``` json
|
||||
{
|
||||
"ConfigVersion": "0.9",
|
||||
"BuildConstraints": "linux,amd64"
|
||||
}
|
||||
```
|
||||
|
||||
I then run `goxc` which compiles the static binary and creates a deb package at
|
||||
`build/0.2.1/imageproxy_0.2.1_amd64.deb` (or whatever the current version is).
|
||||
I copy this file to my server and install it using `sudo dpkg -i
|
||||
imageproxy_0.2.1_amd64.deb`, which is installed to `/usr/bin/imageproxy`.
|
||||
|
||||
Ubuntu uses upstart to manage services, so I copy
|
||||
[`etc/imageproxy.conf`](etc/imageproxy.conf) to `/etc/init/imageproxy.conf` on
|
||||
my server and start it using `sudo service imageproxy start`. You will
|
||||
certainly want to modify that upstart script to suit your desired
|
||||
configuration.
|
||||
Instructions have been contributed below for running on other platforms, but I
|
||||
don't have much experience with them personally.
|
||||
|
||||
### Heroku ###
|
||||
|
||||
|
|
|
@ -36,15 +36,6 @@ import (
|
|||
"willnorris.com/go/imageproxy"
|
||||
)
|
||||
|
||||
// goxc values
|
||||
var (
|
||||
// VERSION is the version string for imageproxy.
|
||||
VERSION = "HEAD"
|
||||
|
||||
// BUILD_DATE is the timestamp of when imageproxy was built.
|
||||
BUILD_DATE string
|
||||
)
|
||||
|
||||
var addr = flag.String("addr", "localhost:8080", "TCP address to listen on")
|
||||
var whitelist = flag.String("whitelist", "", "comma separated list of allowed remote hosts")
|
||||
var referrers = flag.String("referrers", "", "comma separated list of allowed referring hosts")
|
||||
|
@ -55,16 +46,11 @@ var cacheSize = flag.Uint64("cacheSize", 0, "Deprecated: this flag does nothing"
|
|||
var signatureKey = flag.String("signatureKey", "", "HMAC key used in calculating request signatures")
|
||||
var scaleUp = flag.Bool("scaleUp", false, "allow images to scale beyond their original dimensions")
|
||||
var timeout = flag.Duration("timeout", 0, "time limit for requests served by this proxy")
|
||||
var version = flag.Bool("version", false, "print version information")
|
||||
var version = flag.Bool("version", false, "Deprecated: this flag does nothing")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
if *version {
|
||||
fmt.Printf("%v\nBuild: %v\n", VERSION, BUILD_DATE)
|
||||
return
|
||||
}
|
||||
|
||||
c, err := parseCache()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -105,7 +91,7 @@ func main() {
|
|||
Handler: p,
|
||||
}
|
||||
|
||||
fmt.Printf("imageproxy (version %v) listening on %s\n", VERSION, server.Addr)
|
||||
fmt.Printf("imageproxy listening on %s\n", server.Addr)
|
||||
log.Fatal(server.ListenAndServe())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue