Docker image first version
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -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"]
|
||||||
7
examples/hello-with-docker/Dockerfile
Normal file
7
examples/hello-with-docker/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
FROM fes:latest
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
CMD ["fes", "run", "/app"]
|
||||||
5
examples/hello-with-docker/Fes.toml
Normal file
5
examples/hello-with-docker/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[app]
|
||||||
|
|
||||||
|
name = "hello"
|
||||||
|
version = "0.0.1"
|
||||||
|
authors = ["vx-clutch"]
|
||||||
8
examples/hello-with-docker/www/index.lua
Normal file
8
examples/hello-with-docker/www/index.lua
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user