summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-08-18 13:29:54 +0300
committerAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-08-18 13:29:54 +0300
commitfd70f95224374d23157ee7c0357733102cd0df53 (patch)
treee490c12e021cedaf211b292d5d623baa32a673fc /Dockerfile
initialHEADmaster
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..ff53f8c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
+# syntax=docker/dockerfile:1
+
+FROM registry.altlinux.org/alt/node:p11 AS node
+WORKDIR /app
+COPY package.json /app
+COPY package-lock.json /app
+COPY web /app/web
+RUN npm i && npm run esbuild
+
+FROM gitrepo.ru/base/go:1.23.0 AS go
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux go build -o /app/track
+
+FROM registry.altlinux.org/alt/alt:p11
+
+WORKDIR /app
+
+COPY --from=go /app/track /app/track
+COPY --from=node /app/web /app/web
+
+CMD ["/app/track"] \ No newline at end of file