rework to prisma
This commit is contained in:
parent
fd558bd975
commit
3c41666231
@ -35,12 +35,13 @@ WORKDIR /app
|
||||
|
||||
# Copy package.json from build-runner
|
||||
COPY --from=build-runner /tmp/app/package.json /app/package.json
|
||||
COPY --from=build-runner /tmp/app/node_modules /app/node_modules
|
||||
COPY prisma .
|
||||
COPY .env .
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm install --prod
|
||||
RUN npx prisma migrate deploy
|
||||
RUN npx prisma generate
|
||||
|
||||
# Move build files
|
||||
COPY --from=build-runner /tmp/app/build /app/build
|
||||
|
@ -2,6 +2,11 @@ services:
|
||||
app:
|
||||
build: .
|
||||
command: node build/index.mjs
|
||||
pull_policy: build
|
||||
entrypoint:
|
||||
- "bash"
|
||||
- "-c"
|
||||
- "npx prisma migrate deploy && npm start"
|
||||
volumes:
|
||||
- ./db/:/app/db/
|
||||
environment:
|
||||
|
@ -27,7 +27,7 @@ export const bot = new Client({
|
||||
})
|
||||
|
||||
bot.once('ready', async () => {
|
||||
await bot.initApplicationCommands({ global: { disable: { delete: true } } })
|
||||
await bot.initApplicationCommands(true)
|
||||
|
||||
console.log('Bot started')
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user