Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Would use bun, but because better-sqlite3 hates it haha
FROM node:22
# If the bot runs poorly or errors,
# remove -slim from the image name
FROM node:22-slim

WORKDIR /app
COPY . .

RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/python3 /usr/bin/python
COPY package.json package-lock.json ./
RUN apt-get update && apt-get install -y python3 make g++ \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& npm ci --omit=dev

RUN npm install --omit=dev
COPY . .

CMD ["npm", "run", "start"]
CMD ["npm", "start"]
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
bot:
build:
context: .
dockerfile: Dockerfile
container_name: ticket-bot
restart: unless-stopped
environment:
NODE_ENV: production
volumes:
- ticketbotdata:./data # must match the dbpath value in config.yml

volumes:
ticketbotdata: