mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-31 16:00:07 +00:00
* Migrate beginner and minimal bot to discordeno v19
* Add .swcrc and fix minimal yarn.lock
* update .gitignore files
* Update nodejs template
Discordeno.js (DD v13) -> DD v19 "raw"
Currently the permission checking is not working correctly
* Fix permission issue
* Rename the templates
* remove unused indents
* Rename starter to beginner
So now it is minimal (main branch) -> beginner
* Really small refactor & eslint fixes (bigbot template)
This is to make my life less miserable at a later time
* mark rabbitMQ plugins as binary files
git seems to be treating them as text
* Add v19 bigbot rest
* Add gateway code
and rabbitmq_message_deduplication v0.6.2 plugin
* fix yarn messy semevr version for @types/amqplib
* clear channel con amqp connection close
* Add bot code for bigbot v19
missing prisma setup, collector setup & language setup
* Add localization
The "command versioning" system works the same say as before, but instead of a command version the code updates the commands every time they change based on the SHA1 of the commands
* Use file relative paths instead of cwd relative paths
* Fix todos
* revert autocomplete tests
* Revert "Add localization"
This reverts commit 2b1da8d2cd.
* move env assertion to config.ts
* Add shard ping to /ping
* fix small issue
* Update readme files
* use Date.now() for the bigbot REST ping
* Remove bigbot v16 code
* Add docker (compose) setup to bigbot template
* remove healthchecks from rest & gateway
* Update dependencies of examples
* Apply readme(s) suggestions from code review
Hopefully i haven't missed any related to markdown files
Co-authored-by: LTS20050703 <lts20050703@gmail.com>
* Apply code suggestions from code review
Co-authored-by: LTS20050703 <lts20050703@gmail.com>
---------
Co-authored-by: LTS20050703 <lts20050703@gmail.com>
76 lines
1.7 KiB
Docker
76 lines
1.7 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG NODE_VERSION=20
|
|
|
|
################################################################################
|
|
|
|
FROM node:${NODE_VERSION}-alpine as base
|
|
|
|
# Set working directory for all build stages.
|
|
WORKDIR /usr/src/app
|
|
|
|
# Enable corepack so it can install the needed yarn version
|
|
RUN corepack enable
|
|
|
|
COPY package.json .
|
|
COPY yarn.lock .
|
|
# We need to copy the yarnrc or else yarn will attempt to use PnP
|
|
COPY .yarnrc.yml .
|
|
|
|
RUN yarn install
|
|
|
|
# Copy the rest of the source files into the image.
|
|
COPY . .
|
|
|
|
# Run the build script.
|
|
RUN yarn build
|
|
|
|
# Use production node environment by default.
|
|
ENV NODE_ENV production
|
|
|
|
# Run the application as a non-root user.
|
|
USER node
|
|
|
|
################################################################################
|
|
|
|
FROM base as rest
|
|
|
|
# Expose the port that the application listens on.
|
|
EXPOSE 8000
|
|
|
|
# Run the application.
|
|
CMD node dist/rest/index.js
|
|
|
|
################################################################################
|
|
|
|
FROM base as gateway
|
|
|
|
# Expose the port that the application listens on.
|
|
EXPOSE 8080
|
|
|
|
# Run the application.
|
|
CMD node dist/gateway/index.js
|
|
|
|
################################################################################
|
|
|
|
FROM base as bot
|
|
|
|
# Expose the port that the application listens on.
|
|
EXPOSE 8081
|
|
|
|
# Run the application.
|
|
CMD node dist/bot/index.js
|
|
|
|
################################################################################
|
|
|
|
FROM rabbitmq:3.12-management-alpine as rabbitmq
|
|
|
|
# Copy the rabbitmq plugins
|
|
COPY rabbitmq/plugins/** plugins
|
|
|
|
HEALTHCHECK CMD [ "rabbitmq-diagnostics", "-q", "status" ] \
|
|
--interval=30s --timeout=30s --start-period=30s --retries=5
|
|
|
|
# Enable the required plugins
|
|
RUN rabbitmq-plugins enable rabbitmq_message_deduplication
|