Skip to content

Commit 2c9cbac

Browse files
committed
updated dockerfile (using node-alpine)
1 parent 49a66c0 commit 2c9cbac

6 files changed

Lines changed: 3208 additions & 12 deletions

File tree

.dockerignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Node modules directory
2+
node_modules
3+
4+
# bun lockfile
5+
bun.lockb
6+
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
12+
# Directory for environments
13+
.env
14+
.env.sample
15+
16+
# Docker-related files
17+
Dockerfile
18+
.dockerignore
19+
20+
# Documentation and metadata files
21+
README.md
22+
COMMANDS.md
23+
CONTRIBUTING.md
24+
LICENSE
25+
SECURITY.md
26+
27+
# Configuration files
28+
.editorconfig
29+
.prettierignore
30+
.prettierrc
31+
eslint.config.js
32+
33+
# Git-related files
34+
.git
35+
.gitignore
36+
.gitattributes
37+
38+
# IDE/editor directories and files
39+
.vscode
40+
.idea
41+
42+
# OS-specific files
43+
.DS_Store
44+
Thumbs.db
45+
46+
# GitHub-related directory
47+
.github

.env.sample

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Discord Bot Token
2-
DISCORD_TOKEN="xyz-your-super-secret-bot-token-here-abc-123"
2+
DISCORD_TOKEN=xyz-your-super-secret-bot-token-here-abc-123
33

44
# Client Id
5-
CLIENT_ID="123456789012345678"
5+
CLIENT_ID=123456789012345678
66

77
# Development Guild Id
8-
DEV_GUILD="123456789012345678"
8+
DEV_GUILD=123456789012345678
99

1010
# Developer IDs (comma-separated)
11-
DEV_IDS="12345678901234567,98765432101234567"
11+
DEV_IDS=12345678901234567,98765432101234567
1212

1313
# Support Server Invite Link
14-
SUPPORT_SERVER="https://discord.gg/invite/abc123"
14+
SUPPORT_SERVER=https://discord.gg/invite/abc123
1515

1616
# Development Mode (true/false)
1717
DEVELOPMENT_MODE=false

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Use the official Node.js image as the base image
2-
FROM node:20
2+
FROM node:20-alpine
33

44
# Set the working directory inside the container
55
WORKDIR /usr/src/app
66

77
# Copy package.json and package-lock.json to the working directory
88
COPY package*.json ./
99

10-
# Install the dependencies
11-
RUN npm install
10+
# Install dependencies with verbose output
11+
RUN npm ci --verbose
1212

1313
# Copy the rest of the application code to the working directory
1414
COPY . .
1515

16-
# Install FFmpeg
17-
RUN apt-get update && apt-get install -y ffmpeg
16+
# Install FFmpeg using apk (for Alpine Linux)
17+
RUN apk update && apk add --no-cache ffmpeg
18+
19+
# Cleanup unnecessary cache to minimize image size
20+
RUN rm -rf /var/cache/apk/* /tmp/*
1821

1922
# Command to run the application
20-
CMD ["npm", "start"]
23+
CMD ["npm", "start"]

bun.lockb

-662 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)