Add Dockerfile for bot, rename old Dockerfile

pull/11/head
Stein Ivar Berghei 2023-03-30 18:44:53 +02:00
parent 1f07fc01de
commit 90d57f1bc1
5 changed files with 38 additions and 3 deletions

16
Dockerfile.bot Normal file
View File

@ -0,0 +1,16 @@
FROM golang:1.20 as builder
WORKDIR /src
COPY . .
RUN apt-get update && apt-get -y install libopus-dev libopusfile-dev && \
go build
FROM debian:bullseye-slim
RUN apt-get update && apt-get -y install \
ca-certificates \
libopus-dev libopusfile-dev \
mpd
COPY --from=builder /src/dndmusicbot /app/
ADD tmpl /app/tmpl
WORKDIR /app
ENTRYPOINT [ "/app/dndmusicbot" ]

View File

@ -0,0 +1,16 @@
ambiance
bin
cache
config
cookies.txt
dndmusicbot
Dockerfile
.git
.gitignore
.dockerignore
.jsimage
k8s
MPD
oauth.cfg
test
src

View File

@ -6,4 +6,4 @@ RUN mkdir /public && chmod 777 /public
WORKDIR /app
ENTRYPOINT ["yarn"]
ENTRYPOINT ["yarn"]

View File

@ -0,0 +1,2 @@
ambiance
*.mp3

View File

@ -10,8 +10,9 @@ js: image public/script.js
image: .jsimage
.jsimage: Dockerfile
@docker build -t dndmusicbot-js-build .
.jsimage: export DOCKER_BUILDKIT=1
.jsimage: Dockerfile.js
@docker build -t dndmusicbot-js-build . -f Dockerfile.js
@touch .jsimage
src/node_modules: