summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorNeonXP <i@neonxp.dev>2023-01-04 18:52:25 +0300
committerNeonXP <i@neonxp.dev>2023-01-04 18:52:25 +0300
commit5947c1d643dfc077c19d3b4c01e599578e1dfe62 (patch)
tree6723c5982626403a507ed25c74711ae74eccbe23 /Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..405fe2a
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,26 @@
+## Build
+FROM golang:1.19.3-alpine3.16 AS build
+
+WORKDIR /app
+
+COPY go.mod ./
+COPY go.sum ./
+RUN go mod download
+
+COPY . .
+
+RUN go build -o bot ./cmd/bot
+RUN go build -o bash ./cmd/bash
+
+## Deploy
+FROM alpine:3.16
+
+RUN apk add neofetch
+
+WORKDIR /app
+
+COPY --from=build /app/bot /app/bot
+COPY --from=build /app/bash /app/bash
+COPY db /app/db
+
+CMD ["/app/bot"] \ No newline at end of file