dockerized

This commit is contained in:
Ross Trottier 2024-06-26 16:21:13 -06:00
parent 6bff5cbcb6
commit 00c382de7f
3 changed files with 16 additions and 6 deletions

15
Dockerfile Normal file
View File

@ -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"]

View File

@ -8,11 +8,6 @@ import (
"flag" "flag"
) )
//TODO Get images for each app
//TODO Stylesheet
//TODO VPN Page
//TODO Auth through LDAP for VPN page
type application struct { type application struct {
logger *slog.Logger logger *slog.Logger
templateCache map[string]*template.Template templateCache map[string]*template.Template
@ -21,7 +16,7 @@ type application struct {
func main() { func main() {
//Get env variables //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") tier := flag.String("tier", "starter", "tier the core is on")
flag.Parse() flag.Parse()
//Set up logger //Set up logger

BIN
fed-dashboard Executable file

Binary file not shown.