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

81 lines
2.0 KiB
Markdown
Raw Normal View History

2018-10-04 14:59:57 +02:00
# Installation
There are four ways you can install imgproxy:
2018-10-04 14:59:57 +02:00
2019-09-18 14:04:01 +02:00
## Docker
2018-10-04 14:59:57 +02:00
imgproxy can (and should) be used as a standalone application inside a Docker container. Just pull the official image from Docker Hub:
```bash
$ docker pull darthsim/imgproxy:latest
$ docker run -p 8080:8080 -it darthsim/imgproxy
```
2018-10-08 08:23:20 +02:00
You can also build your own image. imgproxy is ready to be dockerized, plug and play:
2018-10-04 14:59:57 +02:00
```bash
$ docker build -t imgproxy .
$ docker run -p 8080:8080 -it imgproxy
```
2019-09-18 14:04:01 +02:00
## Heroku
2018-10-04 14:59:57 +02:00
2018-10-08 08:23:20 +02:00
imgproxy can be deployed to Heroku with a click of a button:
2018-10-04 14:59:57 +02:00
2019-06-17 13:54:11 +02:00
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/imgproxy/imgproxy)
2018-10-04 14:59:57 +02:00
However, you can do it manually with a few steps:
```bash
2019-06-17 13:54:11 +02:00
$ git clone https://github.com/imgproxy/imgproxy.git && cd imgproxy
2018-10-04 14:59:57 +02:00
$ heroku create your-application
$ heroku stack:set container
$ git push heroku master
```
2019-09-18 14:04:01 +02:00
## Packages
2019-09-18 14:04:01 +02:00
### Arch Linux and derivatives
[imgproxy](https://aur.archlinux.org/packages/imgproxy/) package is available from AUR.
2019-09-18 14:04:01 +02:00
## From the source
2018-10-04 14:59:57 +02:00
2019-09-18 14:04:01 +02:00
### Ubuntu
2018-10-04 14:59:57 +02:00
2019-06-17 13:54:11 +02:00
First, install [libvips](https://github.com/libvips/libvips).
2018-10-04 14:59:57 +02:00
2019-06-17 13:54:11 +02:00
Ubuntu apt repository contains a pretty old version of libvips. You can use PPA with more recent version of libvips:
2019-06-17 13:54:11 +02:00
```bash
$ 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](https://github.com/libvips/libvips/wiki/Build-for-Ubuntu)
Next, install the latest Go:
```bash
$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt-get update
$ sudo apt-get install golang-go
```
And finally, install imgproxy itself:
2018-10-04 14:59:57 +02:00
2019-06-17 13:54:11 +02:00
```bash
$ CGO_LDFLAGS_ALLOW="-s|-w" go get -f -u github.com/imgproxy/imgproxy
```
2018-10-04 14:59:57 +02:00
2019-09-18 14:04:01 +02:00
### macOS + Homebrew
2019-06-17 13:54:11 +02:00
```bash
$ brew install vips go
$ 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
```