-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * WIP * WIP * Works * Rewrite so its easier to test * Appease the linter * Just embed the state * Revert "Just embed the state" This reverts commit 48a9965. * Telemetry test; fix config test * finish telemetry tests * add extra check for disabled telemetry * fix analytics prop field names * mod tidy
- Loading branch information
1 parent
e53fb0f
commit 65581fe
Showing
14 changed files
with
546 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
ARG BINARY=flipt | ||
|
||
FROM alpine:3.15.4 | ||
LABEL maintainer="[email protected]" | ||
|
||
LABEL maintainer="[email protected]" | ||
LABEL org.opencontainers.image.name="flipt" | ||
LABEL org.opencontainers.image.source="https://github.com/markphelps/flipt" | ||
|
||
|
@@ -19,7 +20,7 @@ COPY config/migrations/ /etc/flipt/config/migrations/ | |
COPY config/*.yml /etc/flipt/config/ | ||
|
||
RUN addgroup flipt && \ | ||
adduser -S -D -H -g '' -G flipt -s /bin/sh flipt && \ | ||
adduser -S -D -g '' -G flipt -s /bin/sh flipt && \ | ||
chown -R flipt:flipt /etc/flipt /var/opt/flipt | ||
|
||
EXPOSE 8080 | ||
|
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 |
---|---|---|
|
@@ -38,3 +38,4 @@ db: | |
|
||
meta: | ||
check_for_updates: false | ||
telemetry_enabled: false |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package info | ||
|
||
import ( | ||
"encoding/json" | ||
"net/http" | ||
) | ||
|
||
type Flipt struct { | ||
Version string `json:"version,omitempty"` | ||
LatestVersion string `json:"latestVersion,omitempty"` | ||
Commit string `json:"commit,omitempty"` | ||
BuildDate string `json:"buildDate,omitempty"` | ||
GoVersion string `json:"goVersion,omitempty"` | ||
UpdateAvailable bool `json:"updateAvailable"` | ||
IsRelease bool `json:"isRelease"` | ||
} | ||
|
||
func (f Flipt) ServeHTTP(w http.ResponseWriter, r *http.Request) { | ||
out, err := json.Marshal(f) | ||
if err != nil { | ||
w.WriteHeader(http.StatusInternalServerError) | ||
return | ||
} | ||
|
||
if _, err = w.Write(out); err != nil { | ||
w.WriteHeader(http.StatusInternalServerError) | ||
return | ||
} | ||
} |
Oops, something went wrong.