Dockerfile

This commit is contained in:
Erik 2024-03-25 23:25:25 +02:00
parent 2e291c514b
commit d0edf08d5e
3 changed files with 21 additions and 2 deletions

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:lts-alpine as builder
RUN apk update && apk add build-base python3
WORKDIR /musicbot
COPY package.json package.json
COPY ./.yarnrc.yml ./.yarnrc.yml
COPY ./.yarn/releases ./.yarn/releases
# CMD ["/bin/ash"]
RUN yarn install
FROM node:lts-alpine
WORKDIR /musicbot
COPY build build
COPY --from=builder /musicbot/node_modules ./node_modules
COPY package.json package.json
VOLUME [ "/musicbot/cache" ]
CMD ["node", "--enable-source-maps", "build/index.js"]
# CMD ["/bin/ash"]

View File

@ -13,7 +13,8 @@
"dev": "nodemon --delay 5 -e js --trace-warnings --unhandled-rejections=strict build/index.js", "dev": "nodemon --delay 5 -e js --trace-warnings --unhandled-rejections=strict build/index.js",
"debug": "node --trace-warnings --inspect index.js", "debug": "node --trace-warnings --inspect index.js",
"lint": "eslint --fix src/", "lint": "eslint --fix src/",
"build": "tsc --build" "build": "tsc --build",
"dockerpub": "yarn build && docker build . --tag git.corgi.wtf/navy.gif/music-bot:latest && docker push git.corgi.wtf/navy.gif/music-bot:latest"
}, },
"dependencies": { "dependencies": {
"@discordjs/opus": "^0.9.0", "@discordjs/opus": "^0.9.0",

View File

@ -107,7 +107,7 @@ class MusicPlayer implements Initialisable
this.#client.user?.setPresence({ this.#client.user?.setPresence({
activities: [{ activities: [{
name: `${info.arist} - ${info.title}`, name: `${info.title} by ${info.arist}`,
type: ActivityType.Listening type: ActivityType.Listening
}] }]
}); });