more docker stuff

This commit is contained in:
JandereDev 2022-04-18 21:16:12 +02:00
parent aaddec9948
commit 3e932a0d6b
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A
3 changed files with 24 additions and 0 deletions

View file

@ -13,6 +13,9 @@ DB_PASS=
# Your bot account's token. # Your bot account's token.
BOT_TOKEN= BOT_TOKEN=
# A Discord bot token, used for the bridge service.
BOT_TOKEN_DISCORD=
# The default prefix, can be overridden by server owners. # The default prefix, can be overridden by server owners.
# Leave empty to keep default ("/") # Leave empty to keep default ("/")
BOT_PREFIX= BOT_PREFIX=

13
bridge/Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM node:16 as build
WORKDIR /build/
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build
FROM node:16 as prod
WORKDIR /app/
COPY --from=build /build/package.json /build/yarn.lock ./
COPY --from=build /build/dist ./dist
RUN yarn install --production --frozen-lockfile
CMD ["yarn", "start"]

View file

@ -45,6 +45,14 @@ services:
- 0.0.0.0:9000:9000 - 0.0.0.0:9000:9000
restart: unless-stopped restart: unless-stopped
bridge:
build: ./bridge
environment:
- REVOLT_TOKEN=${BOT_TOKEN}
- DISCORD_TOKEN=${BOT_TOKEN_DISCORD}
- DB_STRING=mongodb://mogus:${DB_PASS}@mongo:27017/admin
restart: unless-stopped
# If you prefer to host the web app on a different # If you prefer to host the web app on a different
# platform like Vercel, you can remove this part. # platform like Vercel, you can remove this part.
web: web: