diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..23095de --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:18 as build + +WORKDIR /build/app +COPY package.json tsconfig.json /build/app/ +COPY src /build/app/src/ +RUN npm install --frozen-lockfile +RUN yarn build + +FROM node:18 as run +WORKDIR /app +COPY --from=build /build/app/ /app/ +CMD ["node", "--experimental-specifier-resolution=node", "dist"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1d62c7b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +services: + bot: + build: . + restart: unless-stopped + env_file: + - .env