1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-29 08:22:11 +02:00
imgproxy/docs/installation.md
2020-02-27 22:30:31 +06:00

2.6 KiB

Installation

There are four ways you can install imgproxy:

Docker

imgproxy can (and should) be used as a standalone application inside a Docker container. Just pull the official image from Docker Hub:

docker pull darthsim/imgproxy:latest
docker run -p 8080:8080 -it darthsim/imgproxy

You can also build your own image. imgproxy is ready to be dockerized, plug and play:

docker build -f docker/Dockerfile -t imgproxy .
docker run -p 8080:8080 -it imgproxy

Helm

imgproxy can be easily deployed to your Kubernetes cluster using Helm and our official Helm chart:

helm repo add imgproxy https://helm.imgproxy.net/

# With Helm 3
helm upgrade -i imgproxy imgproxy/imgproxy

# With Helm 2
helm upgrade -i --name imgproxy imgproxy/imgproxy

Read the chart's README for more info.

Heroku

imgproxy can be deployed to Heroku with a click of a button:

Deploy

However, you can do it manually with a few steps:

git clone https://github.com/imgproxy/imgproxy.git && cd imgproxy
heroku create your-application
heroku stack:set container
git push heroku master

Packages

Arch Linux and derivatives

imgproxy package is available from AUR.

macOS + Homebrew

imgproxy is available from Homebrew:

brew install imgproxy

From the source

Ubuntu

First, install libvips.

Ubuntu apt repository contains a pretty old version of libvips. You can use PPA with more recent version of libvips:

sudo add-apt-repository ppa:dhor/myway
sudo apt-get update
sudo apt-get install libvips-dev

But if you want to use all the features of imgproxy, it's recommended to build libvips from the source: https://github.com/libvips/ libvips/wiki/Build-for-Ubuntu

Next, install the latest Go:

sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install golang-go

And finally, install imgproxy itself:

GO111MODULE=on \
  CGO_LDFLAGS_ALLOW="-s|-w" \
  go get -f -u github.com/imgproxy/imgproxy/v2

macOS + Homebrew

brew install vips go
GO111MODULE=on \
  PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig" \
  CGO_LDFLAGS_ALLOW="-s|-w" \
  CGO_CFLAGS_ALLOW="-Xpreprocessor" \
  go get -f -u github.com/imgproxy/imgproxy/v2