generated from lucxjo/template
Louis Hollingworth
17d8746767
Boosters now have a role created for them and added to their profile. Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
41 lines
847 B
Docker
41 lines
847 B
Docker
## build runner
|
|
FROM node:lts-alpine as build-runner
|
|
|
|
# Set temp directory
|
|
WORKDIR /tmp/app
|
|
|
|
# Move package.json
|
|
COPY package.json .
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Move source files
|
|
COPY src ./src
|
|
COPY tsconfig.json .
|
|
|
|
# Build project
|
|
RUN npm run build
|
|
|
|
## production runner
|
|
FROM node:lts-alpine as prod-runner
|
|
|
|
# Set work directory
|
|
WORKDIR /app
|
|
|
|
# Copy package.json from build-runner
|
|
COPY --from=build-runner /tmp/app/package.json /app/package.json
|
|
|
|
# Install dependencies
|
|
RUN npm install --omit=dev
|
|
|
|
# Move build files
|
|
COPY --from=build-runner /tmp/app/build /app/build
|
|
|
|
# Start bot
|
|
CMD [ "npm", "run", "start" ]
|
|
|
|
LABEL org.opencontainers.image.source=https://git.ludoviko.ch/lucxjo/er
|
|
LABEL org.opencontainers.image.description="A Discord bot for the Young Royals guild"
|
|
LABEL org.opencontainers.image.licenses="GPL-3.0-or-later"
|