Skip to content

Commit

Permalink
Dockerize
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsundso committed Sep 5, 2024
1 parent 29e622e commit c41d47c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:22
WORKDIR /app
RUN corepack enable
COPY . .
WORKDIR /app/packages/Bot
RUN pnpm install
RUN pnpx prisma generate
RUN pnpm build
COPY ./packages/Bot/.env /app/packages/Bot/.env.template
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apt install -y gettext
envsubst < ./.env.template > ./.env
pnpm start
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "npx eslint 'src/**/*.ts' --fix",
"register": "node ./dist/register-commands.js",
"run": "node --max-old-space-size=10240 --no-deprecation --no-warnings --experimental-json-modules ./dist/index.js",
"prestart": "rm -rf dist && pnpm build",
"prestart": "rm -rf dist && pnpm build && pnpx prisma db push",
"start": "pnpm run run",
"watch": "swc src -d dist --strip-leading-paths --copy-files --watch"
},
Expand All @@ -21,7 +21,7 @@
"@total-typescript/ts-reset": "^0.6.1",
"@types/lodash": "^4.17.7",
"@types/lodash.merge": "^4.6.9",
"captcha-canvas": "github:Larsundso/captcha-canvas",
"captcha-canvas": "^2.3.1",
"client@latest": "link:prisma/client@latest",
"discord-api-types": "0.37.99",
"discord-hybrid-sharding": "^2.2.0",
Expand Down

0 comments on commit c41d47c

Please sign in to comment.