2024-05-14 12:17:14 +08:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
|
|
|
|
gobuild:
|
|
|
|
CGO_ENABLED=0 GOOS="linux" GOARCH="amd64" \
|
|
|
|
go build \
|
|
|
|
-ldflags="-s -w" \
|
|
|
|
-tags timetzdata \
|
|
|
|
-v \
|
|
|
|
-o build/app \
|
|
|
|
./cmd/cert-exporter
|
|
|
|
|
2024-05-14 13:38:42 +08:00
|
|
|
dockerbuild:
|
2024-05-14 12:17:14 +08:00
|
|
|
docker build -t esinio/traefik-cert-exporter:latest --no-cache .
|
|
|
|
|
2024-07-31 12:06:11 +08:00
|
|
|
dockerpush: dockerbuild
|
2024-05-14 12:17:14 +08:00
|
|
|
docker push esinio/traefik-cert-exporter:latest
|
|
|
|
|
|
|
|
dockerrun:
|
|
|
|
docker run -itd \
|
|
|
|
--restart=always \
|
|
|
|
--name=traefik-cert-exporter \
|
|
|
|
-v /srv/container/traefik/acme.json:/acme.json \
|
|
|
|
-v /etc/traefik/certs:/certs \
|
|
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
2024-05-14 13:38:42 +08:00
|
|
|
esinio/traefik-cert-exporter
|
|
|
|
|
|
|
|
|