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