From 6837ec6cc88a8f94d1d86c796c8294d73da73913 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Sun, 20 Aug 2023 18:56:20 +0200 Subject: [PATCH] fix: Update Dockerfile to deploy as part of startup --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 40d180c..24033ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"