diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fd70c84 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/package.json b/package.json index 4498af3..c7dd868 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "dev": "nodemon --delay 5 -e js --trace-warnings --unhandled-rejections=strict build/index.js", "debug": "node --trace-warnings --inspect index.js", "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": { "@discordjs/opus": "^0.9.0", diff --git a/src/client/components/MusicPlayer.ts b/src/client/components/MusicPlayer.ts index dad0303..63d227a 100644 --- a/src/client/components/MusicPlayer.ts +++ b/src/client/components/MusicPlayer.ts @@ -107,7 +107,7 @@ class MusicPlayer implements Initialisable this.#client.user?.setPresence({ activities: [{ - name: `${info.arist} - ${info.title}`, + name: `${info.title} by ${info.arist}`, type: ActivityType.Listening }] });