feat: docker for translateer and libretranslate

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-08-06 15:33:26 -03:00
parent a60bbbf0d3
commit 9065737eae
4 changed files with 55 additions and 3 deletions

12
docker/bot.dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM golang:1.22
WORKDIR /usr/src/app
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN make build
RUN go build -v -o /usr/local/bin/app .
CMD ["app"]

View File

@@ -0,0 +1,19 @@
FROM oven/bun:alpine AS build
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN apk add --no-cache git
RUN git clone --depth=1 https://github.com/Songkeys/Translateer.git .
RUN bun install
RUN bun run build
FROM oven/bun:alpine AS run
COPY --from=build /usr/src/app/dist /usr/src/app
WORKDIR /usr/src/app
EXPOSE 8999
CMD ["bun", "run", "app.js"]