Files
discordeno/template/bigbot/Dockerfile
Jonathan Ho a8a89d4b16 feat(Bigbot): added docker-compose (#2538)
* chore: fix script extension

* chore: remove extention

* fix: at least it run can now

* chore: fix dev script

* refactor: change to use env file for config

* chore: update readme

* refactor: put dotenv to top

* feat: add docker and influxdb

* chore: disable deno fmt on bigbot node_modules

* style: deno fmt

* style: deno fmt after upgrade deno

* chore: remove dev console.log

* chore: reverse the influxdb env

* chore: limit the influxdb to localhost

* refactor: seperate build process

* chore: add user pass docs

* refactor: route all to handler

* fix: skip if webhook not exist

* fix: change to use runMethod for send response

* chore: gateway don't depend on bot

* fix: skip if webhook not exist

* fix: first command and error reply not sending

* fix: add try catch to error reply

* fix: reverse interactive.reply

* feat: add fetch analytics to bot process
2022-10-22 07:28:33 -05:00

34 lines
795 B
Docker

FROM node:16.18.0-alpine3.16 AS deps
WORKDIR /app
COPY package.json package-lock.json .swcrc ./
RUN npm install
FROM node:16.18.0-alpine3.16 as rest
COPY --from=deps /app /app
WORKDIR /app
COPY src/analytics.ts src/configs.ts src/
COPY src/rest src/rest
RUN npm run build
EXPOSE 8000
CMD ["npm","run","startr"]
FROM node:16.18.0-alpine3.16 as gateway
COPY --from=deps /app /app
WORKDIR /app
COPY src/configs.ts src/
COPY src/gateway src/gateway
RUN npm run build
EXPOSE 8080
CMD ["npm","run","startg"]
FROM node:16.18.0-alpine3.16 as bot
COPY --from=deps /app /app
WORKDIR /app
COPY prisma prisma
COPY node_modules/.prisma/client node_modules/.prisma/client
COPY src/analytics.ts src/prisma.ts src/configs.ts src/
COPY src/bot src/bot
RUN npm run build
EXPOSE 8080
CMD ["npm","run","startb"]