From 984692d04544465ef9e4bcc1c0646947b097bcc5 Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty Date: Mon, 17 Jan 2022 23:33:51 +0100 Subject: [PATCH] Basic docker support --- Dockerfile | 21 +++++++++------------ docker-compose.yml | 10 ++++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index 2261041..87882e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,16 @@ -FROM node:16-slim as builder +FROM golang:alpine AS build -RUN mkdir /app -COPY package.json /app/ -COPY package-lock.json /app/ -WORKDIR /app -RUN npm ci -COPY . /app -RUN npm run build +WORKDIR /src +RUN apk --no-cache add git +RUN git clone https://codeberg.org/video-prize-ranch/rimgo . -FROM node:16-slim +RUN go build -COPY --from=builder /app/dist/ /app/ +FROM alpine:latest as bin WORKDIR /app +COPY --from=build /src/go-rimgu . -RUN npm install --production +EXPOSE 3000 -CMD ["/usr/local/bin/node", "index.js"] +CMD ["/app/go-rimgu"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c460109 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3' + +services: + rimgo: + build: . + ports: + - 3000:3000 + volumes: + - ./config.yml:/app/config.yml + restart: unless-stopped