From ebca16e5a5b58b87f67ea1f1e17f1ff7af1cae66 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:12:32 +1100 Subject: [PATCH] Merge branch from Novdec --- .dockerignore | 16 ++++++++++++++++ Dockerfile | 11 +++++++++++ docker-compose.yml | 8 ++++++++ 3 files changed, 35 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1d4e483 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,16 @@ +# Pointless stuff +Dockerfile +docker-compose.yml +.ncurc.json +.env +.mailmap +.github +.vscode +.github +postgres-replica-stuff +README.md +ufwReject.sh + +# Startup files +startWithYarn.cjs +botStartup.bat diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..298b3f5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:21.1.0-bookworm-slim +ENV YARN_VERSION 4.0.2 +RUN yarn policies set-version $YARN_VERSION +RUN apt update -y && apt upgrade -y && apt install -y git +RUN npm install -g typescript +WORKDIR /Daggerbot +RUN git config --global --add safe.directory /Daggerbot +COPY tsconfig.json package.json yarn.lock .yarnrc.yml ./ +RUN yarn workspaces focus + +CMD [ "yarn", "node", "." ] diff --git a/docker-compose.yml b/docker-compose.yml index 7a61ddc..731c8d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,12 @@ services: + bot: + container_name: daggerbot-prod + build: . + restart: unless-stopped + volumes: + - ./.git:/Daggerbot/.git:rw + - ./src/:/Daggerbot/src/:rw + - ./dist/:/Daggerbot/dist/:rw cache: container_name: redis-cache image: redis/redis-stack-server:7.2.0-v6