fix: Update Dockerfile to deploy as part of startup

This commit is contained in:
Marius Begby committed 2023-08-20 18:56:20 +02:00
1 parent 054a07dd77
commit 6837ec6cc8
1 file changed
+5 -4
+5 -4
View File
@@ -18,8 +18,9 @@ COPY . .
RUN --mount=type=cache,target=/root/.npm \
npm ci --omit=dev
# Deploy Slash Commands to Discord API
RUN npm run deploy
# Cleanup of unneeded packages and apk cache
RUN apk del python3 make build-base git && \
rm -rf /var/cache/apk/* /tmp/*
# Startup command to run the bot
CMD [ "npm", "run", "start" ]
# Startup command to run the bot after deploying slash commands
CMD /bin/sh -c "npm run deploy && npm run start"