diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f0f5f71 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM golang:1.25-alpine AS builder + +WORKDIR /src + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +RUN go build -o /fes main.go + +FROM alpine:latest + +RUN apk add --no-cache bash lua5.4 + +COPY --from=builder /fes /usr/local/bin/fes + +WORKDIR /app + +CMD ["fes", "run", "/app"] diff --git a/examples/hello-with-docker/Dockerfile b/examples/hello-with-docker/Dockerfile new file mode 100644 index 0000000..b8b3f9e --- /dev/null +++ b/examples/hello-with-docker/Dockerfile @@ -0,0 +1,7 @@ +FROM fes:latest + +COPY . /app + +WORKDIR /app + +CMD ["fes", "run", "/app"] diff --git a/examples/hello-with-docker/Fes.toml b/examples/hello-with-docker/Fes.toml new file mode 100644 index 0000000..31606c1 --- /dev/null +++ b/examples/hello-with-docker/Fes.toml @@ -0,0 +1,5 @@ +[app] + +name = "hello" +version = "0.0.1" +authors = ["vx-clutch"] \ No newline at end of file diff --git a/examples/hello-with-docker/www/index.lua b/examples/hello-with-docker/www/index.lua new file mode 100644 index 0000000..12a2a55 --- /dev/null +++ b/examples/hello-with-docker/www/index.lua @@ -0,0 +1,8 @@ +local fes = require("fes") +local site = fes.fes() + +site.copyright = fes.util.copyright("https://fsd.vxserver.dev", "fSD") + +site:h1("Hello, World!") + +return site