update to docker

This commit is contained in:
VinceC
2024-09-16 07:29:02 -05:00
parent 5208d735c3
commit 5b22425c0e
4 changed files with 26 additions and 2 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
node_modules
npm-debug.log

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# Use an official Node runtime as the parent image
FROM node:18
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of your app's source code
COPY . .
# Your app binds to port 3000 so you'll use the EXPOSE instruction to have it mapped by the docker daemon
EXPOSE 3000
# Define the command to run your app
CMD [ "node", "index.js" ]

3
package-lock.json generated
View File

@@ -10,7 +10,8 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"discord.js": "^14.16.2", "discord.js": "^14.16.2",
"dotenv": "^16.4.5" "dotenv": "^16.4.5",
"undici": "^6.19.8"
} }
}, },
"node_modules/@discordjs/builders": { "node_modules/@discordjs/builders": {

View File

@@ -11,6 +11,7 @@
"description": "", "description": "",
"dependencies": { "dependencies": {
"discord.js": "^14.16.2", "discord.js": "^14.16.2",
"dotenv": "^16.4.5" "dotenv": "^16.4.5",
"undici": "^6.19.8"
} }
} }