diff options
Diffstat (limited to 'net/traefik')
-rw-r--r-- | net/traefik/Makefile | 40 | ||||
-rw-r--r-- | net/traefik/distinfo | 5 | ||||
-rw-r--r-- | net/traefik/files/patch-generate.go | 10 | ||||
-rw-r--r-- | net/traefik/files/traefik.in | 53 | ||||
-rw-r--r-- | net/traefik/pkg-descr | 6 |
5 files changed, 114 insertions, 0 deletions
diff --git a/net/traefik/Makefile b/net/traefik/Makefile new file mode 100644 index 000000000000..0483209c3940 --- /dev/null +++ b/net/traefik/Makefile @@ -0,0 +1,40 @@ +# $FreeBSD$ + +PORTNAME= traefik +PORTVERSION= 1.3.8 +DISTVERSIONPREFIX= v +CATEGORIES= net + +MAINTAINER= riggs@FreeBSD.org +COMMENT= High availability reverse proxy and load balancer + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +USES= go + +USE_GITHUB= yes +GH_ACCOUNT= containous +GH_SUBDIR= src/github.com/containous/traefik +GH_TUPLE= jteeuwen:go-bindata:a0ff256:gobindata/src/github.com/jteeuwen/go-bindata + +USE_RC_SUBR= traefik + +USERS= traefik +GROUPS= traefik + +PLIST_FILES= bin/traefik \ + "@sample etc/traefik.toml.sample" + +do-build: + @cd ${WRKSRC}/src/github.com/jteeuwen/go-bindata/go-bindata; \ + ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x + @cd ${WRKSRC}/src/github.com/containous/traefik; \ + ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go generate && \ + ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x ./cmd/traefik + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/containous/traefik/traefik ${STAGEDIR}${PREFIX}/bin/traefik + ${INSTALL_DATA} ${WRKSRC}/src/github.com/containous/traefik/traefik.sample.toml ${STAGEDIR}${PREFIX}/etc/traefik.toml.sample + +.include <bsd.port.mk> diff --git a/net/traefik/distinfo b/net/traefik/distinfo new file mode 100644 index 000000000000..bba210ab2c98 --- /dev/null +++ b/net/traefik/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1507464024 +SHA256 (containous-traefik-v1.3.8_GH0.tar.gz) = 2e949d01b771550cacd2ab68692b867fa98818eb5918f982fcc9b63fbf073e92 +SIZE (containous-traefik-v1.3.8_GH0.tar.gz) = 10757773 +SHA256 (jteeuwen-go-bindata-a0ff256_GH0.tar.gz) = 06c7bb64ab428a28eb3633ae19fafb6b7b241d384ef45ac0728b1c5fbec64961 +SIZE (jteeuwen-go-bindata-a0ff256_GH0.tar.gz) = 17868 diff --git a/net/traefik/files/patch-generate.go b/net/traefik/files/patch-generate.go new file mode 100644 index 000000000000..31209892762c --- /dev/null +++ b/net/traefik/files/patch-generate.go @@ -0,0 +1,10 @@ +--- generate.go.orig 2017-09-07 20:04:03 UTC ++++ generate.go +@@ -4,6 +4,6 @@ Copyright + + //go:generate rm -vf autogen/gen.go + //go:generate mkdir -p static +-//go:generate go-bindata -pkg autogen -o autogen/gen.go ./static/... ./templates/... ++//go:generate src/github.com/jteeuwen/go-bindata/go-bindata/go-bindata -pkg autogen -o autogen/gen.go ./static/... ./templates/... + + package main diff --git a/net/traefik/files/traefik.in b/net/traefik/files/traefik.in new file mode 100644 index 000000000000..c27eb6a04d4d --- /dev/null +++ b/net/traefik/files/traefik.in @@ -0,0 +1,53 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: traefik +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# traefik_enable (bool): Set to NO by default. +# Set it to YES to enable traefik. +# traefik_user (user): Set user to run traefik. +# Default is "traefik". +# traefik_group (group): Set group to run traefik. +# Default is "traefik". +# traefik_conf (path): Path to traefik configuration file. +# Default is %%PREFIX%%/etc/traefik.toml +# traefik_env (vars): Set environment variables used with traefik +# Default is "". +# These are necessary for ACME (Let's Encrypt) +# configuration, see +# https://docs.traefik.io/configuration/acme/ + +. /etc/rc.subr + +name=traefik +rcvar=traefik_enable + +load_rc_config $name + +: ${traefik_enable:="NO"} +: ${traefik_user:="traefik"} +: ${traefik_group:="traefik"} +: ${traefik_conf:="%%PREFIX%%/etc/traefik.toml"} +: ${traefik_env:=""} + +pidfile=/var/run/traefik.pid +procname="%%PREFIX%%/bin/traefik" +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} /usr/bin/env ${traefik_env} ${procname} --configFile=${traefik_conf} ${traefik_args}" + +start_precmd=traefik_startprecmd + +traefik_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${traefik_user} -g ${traefik_group} /dev/null ${pidfile}; + fi +} + +run_rc_command "$1" diff --git a/net/traefik/pkg-descr b/net/traefik/pkg-descr new file mode 100644 index 000000000000..5987f7269bfa --- /dev/null +++ b/net/traefik/pkg-descr @@ -0,0 +1,6 @@ +Traefik (pronounced like traffic) is a modern HTTP reverse proxy and load +balancer made to deploy microservices with ease. It supports several backends +(Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS, +and a lot more) to manage its configuration automatically and dynamically. + +WWW: https://traefik.io/ |