generated from KevinNovak/Discord-Bot-TypeScript-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (31 loc) · 762 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM node:20
LABEL org.opencontainers.image.source="https://github.com/dctaylor/mookiebot"
# Create app directory
WORKDIR /app
# ENV Variables
ENV CLIENT_ID 0
ENV CLIENT_TOKEN 0
ENV MONGODB_URL="mongodb://"
ENV MUSIC_DB=music
ENV MUSIC_COLLECTION=music
ENV SERVER_ID=
ENV MUSIC_CHANNEL_NAME=music
ENV TZ="America/Los_Angeles"
# Copy package.json and package-lock.json
COPY package*.json ./
COPY yarn*.lock ./
# Change in how yarn works, need to enable corepack now
RUN corepack enable
RUN yarn set version berry
# Install packages
RUN yarn install
# Copy the app code
COPY . .
RUN yarn install
# Build the project
RUN yarn run build
# RUN yarn run commands:register
# Expose ports
EXPOSE 3001
# Run the application
CMD [ "node", "dist/start-bot.js" ]