Skip to content

Commit 80b056a

Browse files
Fix dockerfile
1 parent afd265d commit 80b056a

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Dockerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18-alpine
1+
FROM node:18-alpine as build
22

33
WORKDIR /app
44

@@ -8,4 +8,16 @@ RUN npm i
88

99
RUN npm run build
1010

11+
FROM node:18-alpine
12+
13+
WORKDIR /app
14+
15+
ENV NODE_ENV=production
16+
17+
COPY --from=build /app/dist .
18+
19+
COPY --from=build /app/package*.json .
20+
21+
RUN npm ci
22+
1123
CMD ["npm", "run", "prod"]

index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Client, GatewayIntentBits, Collection } from "discord.js";
22

33
import { loadEventHandlers } from "./events/index.js";
44
import { loadSlashCommands } from "./commands/index.js";
5-
import { register } from "./dev.js";
65

76
import type { DiscordClient, SlashCommand } from "./lib/types.js";
87

@@ -17,7 +16,6 @@ client.commands = new Collection<String, SlashCommand>();
1716

1817
loadEventHandlers(client);
1918
loadSlashCommands(client);
20-
register(client);
2119

2220
mongoose.connect(process.env.MONGODB_URI || "").then(() => console.log("MongoDB connected")).catch(err => {
2321
console.log("Failed to connect to MongoDB");

0 commit comments

Comments
 (0)