-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
38 lines (27 loc) · 843 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# BryanBot Dockerfile v2.0.2
# authors:
# - NotAShelf <[email protected]>
# - XCraftMan52 <[email protected]>
# Node 18.2.0
# From Node 18 Alpine image
FROM node:18-alpine as base
# Set maintainer
LABEL MAINTAINER="NotAShelf <[email protected]>"
# Install pnpm
RUN npm i -g pnpm
FROM base as dependencies
# Set working directory
WORKDIR /opt/bryanbot
# And copy files into that directory
COPY . ./
# fetch packages from pnpm-lock.yaml
RUN pnpm fetch
# Install dependencies
RUN pnpm install -r --no-frozen-lockfile
FROM dependencies as deploy
# Make sure the data directory exists so that we can mount it
RUN mkdir -p /opt/bryanbot/data
# Start the bot with the BOT_PLATFORM environment variable set to Docker
# This allows the bot to decide the correct error message(s)
RUN export BOT_PLATFORM=Docker
CMD [ "pnpm", "start" ]