Skip to content

Commit

Permalink
update docker details
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Teja Madha committed Jul 15, 2023
1 parent 9d4c0dd commit 3dc9f99
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.DS_Store
node_modules/
.git/
.vscode/
docs/
*.log
*.tar.gz
*.tar
.env
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "4"

services:
discord-js-bot:
image: saitejamadha/discord-js-bot:5.1.0
image: saitejamadha/discord-js-bot:5.4.0
container_name: discord-js-bot
restart: unless-stopped
networks:
Expand Down
21 changes: 20 additions & 1 deletion dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
# Base image
FROM node:16-alpine

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json to the container
COPY package*.json ./

# Install only production dependencies
RUN npm ci --omit=dev

# Bundle rest of the source code
COPY . .

EXPOSE 8080-8089 449
# Environment variables
ENV BOT_TOKEN=
ENV MONGO_CONNECTION=
ENV ERROR_LOGS=
ENV JOIN_LEAVE_LOGS=
ENV BOT_SECRET=
ENV SESSION_PASSWORD=
ENV WEATHERSTACK_KEY=
ENV STRANGE_API_KEY=
ENV SPOTIFY_CLIENT_ID=
ENV SPOTIFY_CLIENT_SECRET=

# Expose port 8080 for dashboard
EXPOSE 8080

# Define the command to run your Node.js application
CMD [ "node", "bot.js" ]
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"scripts": {
"dev": "nodemon .",
"start": "node .",
"format": "prettier --write src"
"format": "prettier --write src",
"docker:build": "docker build -t saitejamadha/discord-js-bot:5.4.0 ."
},
"homepage": "https://github.com/saiteja-madha/discord-js-bot#readme",
"repository": {
Expand Down

0 comments on commit 3dc9f99

Please sign in to comment.