aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GIDs2
-rw-r--r--UIDs2
-rw-r--r--net/Makefile1
-rw-r--r--net/traefik/Makefile40
-rw-r--r--net/traefik/distinfo5
-rw-r--r--net/traefik/files/patch-generate.go10
-rw-r--r--net/traefik/files/traefik.in53
-rw-r--r--net/traefik/pkg-descr6
8 files changed, 117 insertions, 2 deletions
diff --git a/GIDs b/GIDs
index bde56de6ca43..cde86801e813 100644
--- a/GIDs
+++ b/GIDs
@@ -416,7 +416,7 @@ vault:*:471:
nomad:*:472:
minio:*:473:
gitlab-runner:*:474:
-# free: 475
+traefik:*:475:
# free: 476
# free: 477
prometheus:*:478:
diff --git a/UIDs b/UIDs
index a4f2b072728f..de6f7ef7d41b 100644
--- a/UIDs
+++ b/UIDs
@@ -422,7 +422,7 @@ vault:*:471:471::0:0:Vault Daemon:/nonexistent:/usr/sbin/nologin
nomad:*:472:472::0:0:Nomad Daemon:/var/tmp/nomad:/usr/sbin/nologin
minio:*:473:473::0:0:Minio Daemon:/var/tmp/minio:/usr/sbin/nologin
gitlab-runner:*:474:474::0:0:GitLab Runner Daemon:/var/tmp/gitlab_runner:/usr/sbin/nologin
-# free: 475
+traefik:*:475:475::0:0:Traefik Daemon:/var/tmp/traefik:/usr/sbin/nologin
# free: 476
# free: 477
prometheus:*:478:478::0:0:Prometheus Daemon:/var/tmp/prometheus:/usr/sbin/nologin
diff --git a/net/Makefile b/net/Makefile
index de6b4ed60c1a..4e84deaf02d0 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1386,6 +1386,7 @@
SUBDIR += torsocks
SUBDIR += traceroute
SUBDIR += traff
+ SUBDIR += traefik
SUBDIR += trafshow
SUBDIR += trafshow3
SUBDIR += tramp
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/