Merge pull request 'Basic docker support' (#2) from TheFrenchGhosty/rimgo:dockerfile into master
Reviewed-on: https://codeberg.org/video-prize-ranch/rimgo/pulls/2
This commit is contained in:
commit
f68dc9daa5
21
Dockerfile
21
Dockerfile
|
@ -1,19 +1,16 @@
|
||||||
FROM node:16-slim as builder
|
FROM golang:alpine AS build
|
||||||
|
|
||||||
RUN mkdir /app
|
WORKDIR /src
|
||||||
COPY package.json /app/
|
RUN apk --no-cache add git
|
||||||
COPY package-lock.json /app/
|
RUN git clone https://codeberg.org/video-prize-ranch/rimgo .
|
||||||
WORKDIR /app
|
|
||||||
RUN npm ci
|
|
||||||
COPY . /app
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM node:16-slim
|
RUN go build
|
||||||
|
|
||||||
COPY --from=builder /app/dist/ /app/
|
FROM alpine:latest as bin
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
COPY --from=build /src/rimgo .
|
||||||
|
|
||||||
RUN npm install --production
|
EXPOSE 3000
|
||||||
|
|
||||||
CMD ["/usr/local/bin/node", "index.js"]
|
CMD ["/app/rimgo"]
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
rimgo:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
volumes:
|
||||||
|
- ./config.yml:/app/config.yml
|
||||||
|
restart: unless-stopped
|
Loading…
Reference in New Issue