Create Dockerfile for bot

This commit is contained in:
Alex Thomassen 2024-06-12 20:06:44 +00:00
parent 951117d181
commit be67085ab1
Signed by: Alex
GPG Key ID: 10BD786B5F6FF5DE
4 changed files with 26 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
dist
downloads
node_modules

1
.gitignore vendored
View File

@ -132,3 +132,4 @@ dist
## Custom
config.js
yt-dlp
docker-compose.yml

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:20-bookworm
WORKDIR /app
COPY . /app
RUN ["npm", "install", "-g", "typescript"]
RUN ["npm", "install"]
ENV DEBIAN_FRONTEND=noninteractive
RUN ["apt", "update"]
RUN ["apt", "install", "-y", "ffmpeg"]
ENTRYPOINT ["npm", "run", "start"]

View File

@ -0,0 +1,9 @@
services:
musicbot:
build: .
container_name: MusicBot
restart: unless-stopped
volumes:
- ./config.js:/app/config.js:ro
- ./downloads:/app/downloads