Skip to content

Commit 1130c23

Browse files
committed
[1.2] Docker support
1 parent ca49b6b commit 1130c23

File tree

5 files changed

+34
-2
lines changed

5 files changed

+34
-2
lines changed

Diff for: .dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.env
2+
node_modules/
3+
package-lock.json

Diff for: Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:22.12.0
2+
3+
WORKDIR /
4+
5+
COPY package.json /
6+
7+
RUN npm install --production
8+
9+
COPY . /
10+
11+
CMD ["node", "--no-warnings", "index.js", "start"]

Diff for: docker-compose.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
ChannelMigrator:
3+
image: channelmigrator
4+
build: .
5+
container_name: ChannelMigrator
6+
restart: always
7+
env_file:
8+
- .env
9+
volumes:
10+
- .:/bot
11+
networks:
12+
- Cordos
13+
14+
networks:
15+
Cordos:
16+
external: true

Diff for: index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
console.log("ChannelMigrator started!");
22

3-
import packageJson from "./package.json" assert { type: "json" };
3+
import fs from "fs/promises"
4+
const packageJson = JSON.parse(await fs.readFile("./package.json"))
5+
46
import dotenv from "dotenv";
57
dotenv.config();
68

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "channelmigrator",
3-
"version": "1.1",
3+
"version": "1.2",
44
"description": "Discord bot intended for migrating channels with messages to other servers.",
55
"main": "index.js",
66
"type": "module",

0 commit comments

Comments
 (0)