Add Docker stuffs

This commit is contained in:
Alexander Harding
2026-07-12 16:56:52 -04:00
parent fce43b9b2f
commit f1382936a5
3 changed files with 35 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
node_modules
.env
.gitignore
.git
docker-compose.yml
Dockerfile
.dockerignore
+18
View File
@@ -0,0 +1,18 @@
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=builder /app .
CMD ["node", "dist/index.js"]
+10
View File
@@ -0,0 +1,10 @@
services:
discord-bot:
build: .
container_name: dndhelper
restart: unless-stopped
tty: true
volumes:
- /srv/dndhelper/data:/app/data
environment:
- TOKEN=${TOKEN}