aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.env.example3
-rw-r--r--Dockerfile21
2 files changed, 24 insertions, 0 deletions
diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..238c103
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,3 @@
+DB_DRIVER=sqlite # sqlite, mysql, postgres, sqlserver (case sensitive)
+DSN=metachan.db
+PORT=3000 \ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..1c7a1a7
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+FROM golang:1.24-alpine AS builder
+
+WORKDIR /metachan
+
+RUN apk add --no-cache git make
+
+COPY go.mod go.sum* ./
+RUN go mod download
+
+COPY . .
+RUN make build
+
+FROM alpine:latest
+
+WORKDIR /metachan
+
+RUN apk --no-cache add ca-certificates tzdata
+
+COPY --from=builder /metachan/bin/metachan .
+
+CMD ["./metachan"] \ No newline at end of file