diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7b89751 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM golang:1.22-alpine as build + +ENV TIER=starter + +WORKDIR /build +COPY . . +RUN go mod download +RUN go build -o=./fed-dashboard ./cmd/web + +FROM gcr.io/distroless/static-debian11 + +COPY --from=build /build/fed-dashboard . +COPY --from=build /build/ui/ /ui/ +EXPOSE 8080 +ENTRYPOINT ["/fed-dashboard"] \ No newline at end of file diff --git a/cmd/web/main.go b/cmd/web/main.go index e12135c..c440fd8 100644 --- a/cmd/web/main.go +++ b/cmd/web/main.go @@ -8,11 +8,6 @@ import ( "flag" ) -//TODO Get images for each app -//TODO Stylesheet -//TODO VPN Page -//TODO Auth through LDAP for VPN page - type application struct { logger *slog.Logger templateCache map[string]*template.Template @@ -21,7 +16,7 @@ type application struct { func main() { //Get env variables - addr := flag.String("addr", ":4000", "HTTP network address") + addr := flag.String("addr", ":8080", "HTTP network address") tier := flag.String("tier", "starter", "tier the core is on") flag.Parse() //Set up logger diff --git a/fed-dashboard b/fed-dashboard new file mode 100755 index 0000000..483d9c6 Binary files /dev/null and b/fed-dashboard differ