From a8cfc63848e138b96dd95df4304a4d5ea5cfdc88 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Mon, 23 Jun 2025 19:45:40 -0700 Subject: [PATCH] (CI/CD): Attempting to dockerize for mobile development. --- Dockerfile | 13 ++ flake.nix | 2 + internal/templates/components/navbar.templ | 137 ++++++++---------- internal/templates/components/navbar_templ.go | 10 +- 4 files changed, 78 insertions(+), 84 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..99328ad --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM golang:1.24 + +WORKDIR /app + +COPY . . + +RUN go mod download + +RUN CGO_ENABLED=0 GOOS=linux go build -o /app/app /app/cmd/web/main.go + +EXPOSE 3000 + +CMD [ "/app/app" ] diff --git a/flake.nix b/flake.nix index 85a20a5..1ca34fc 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,8 @@ tailwindcss_4 tailwindcss-language-server watchman + docker-language-server + dockerfile-language-server-nodejs ]; # Define the shell that will be executed. diff --git a/internal/templates/components/navbar.templ b/internal/templates/components/navbar.templ index 115fc5f..b1560a5 100644 --- a/internal/templates/components/navbar.templ +++ b/internal/templates/components/navbar.templ @@ -3,7 +3,7 @@ package components import "strings" templ hamburgerMenu() { - - + } templ navLink(current, name, url string) { - - { name } - + + { name } + } templ dropdownLink(name, url string) { - - { name } - + + { name } + } templ listIcon(current, name, url string) { - - - - - + + + + + + } templ Navbar(current string) { - + } diff --git a/internal/templates/components/navbar_templ.go b/internal/templates/components/navbar_templ.go index bd77620..f04ba9d 100644 --- a/internal/templates/components/navbar_templ.go +++ b/internal/templates/components/navbar_templ.go @@ -91,7 +91,7 @@ func navLink(current, name, url string) templ.Component { var templ_7745c5c3_Var3 templ.SafeURL templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(url)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 41, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 38, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -119,7 +119,7 @@ func navLink(current, name, url string) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 48, Col: 8} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 41, Col: 8} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -161,7 +161,7 @@ func dropdownLink(name, url string) templ.Component { var templ_7745c5c3_Var6 templ.SafeURL templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(url)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 53, Col: 42} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 46, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -174,7 +174,7 @@ func dropdownLink(name, url string) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 54, Col: 8} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 47, Col: 8} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -216,7 +216,7 @@ func listIcon(current, name, url string) templ.Component { var templ_7745c5c3_Var9 templ.SafeURL templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(url)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 59, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/components/navbar.templ`, Line: 52, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil {