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 \ RUN --mount=type=cache,target=/root/.npm \
npm ci --omit=dev npm ci --omit=dev
# Deploy Slash Commands to Discord API # Cleanup of unneeded packages and apk cache
RUN npm run deploy RUN apk del python3 make build-base git && \
rm -rf /var/cache/apk/* /tmp/*
# Startup command to run the bot # Startup command to run the bot after deploying slash commands
CMD [ "npm", "run", "start" ] CMD /bin/sh -c "npm run deploy && npm run start"