-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgraded docker to newest Signed-off-by: Gaardsholt <[email protected]> * circleci is now using golang 1.18 as well Signed-off-by: Gaardsholt <[email protected]> * did stuff Signed-off-by: Gaardsholt <[email protected]> * added server and health port config option Signed-off-by: Gaardsholt <[email protected]> * cleanup + restructure Signed-off-by: Gaardsholt <[email protected]> * added option to control log level Signed-off-by: Gaardsholt <[email protected]> * added a small blur transition Signed-off-by: Gaardsholt <[email protected]> * go mod Signed-off-by: Gaardsholt <[email protected]> * go mod upgrades Signed-off-by: Gaardsholt <[email protected]> * is now using a royalty free background image + when creating a new secret it will be blurred Signed-off-by: Gaardsholt <[email protected]>
- Loading branch information
1 parent
2bcd849
commit 8c21181
Showing
16 changed files
with
331 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
FROM golang:1.17.1-alpine AS builder | ||
FROM golang:1.18-alpine AS builder | ||
WORKDIR $GOPATH/src/app | ||
COPY . . | ||
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /tmp/app | ||
RUN GOOS=linux GOARCH=amd64 go build -buildvcs=false -ldflags="-w -s" -o /tmp/app | ||
|
||
FROM alpine | ||
RUN mkdir /app | ||
WORKDIR /app | ||
COPY --from=builder /tmp/app app | ||
ADD ./static static/ | ||
ADD ./templates templates/ | ||
|
||
RUN addgroup -S appgroup && adduser -S appuser -G appgroup && chown -R appuser /app | ||
|
||
USER appuser | ||
|
||
CMD ["/app/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package api | ||
|
||
import "net/http" | ||
|
||
// healthz is a liveness probe. | ||
func healthz(w http.ResponseWriter, _ *http.Request) { | ||
w.WriteHeader(http.StatusOK) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package api | ||
|
||
import ( | ||
"github.com/Gaardsholt/pass-along/metrics" | ||
"github.com/prometheus/client_golang/prometheus" | ||
) | ||
|
||
var pr *prometheus.Registry | ||
|
||
func registerPrometheusMetrics() { | ||
pr = prometheus.NewRegistry() | ||
// pr.MustRegister(types.NewSecretsInCache(&secretStore)) | ||
pr.MustRegister(metrics.SecretsRead) | ||
pr.MustRegister(metrics.ExpiredSecretsRead) | ||
pr.MustRegister(metrics.NonExistentSecretsRead) | ||
pr.MustRegister(metrics.SecretsCreated) | ||
pr.MustRegister(metrics.SecretsCreatedWithError) | ||
pr.MustRegister(metrics.SecretsDeleted) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.