mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
765 B
Docker
34 lines
765 B
Docker
FROM node:lts-alpine
|
|
|
|
# Working directory
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
RUN npm install -g pnpm@7.1.9
|
|
|
|
# Install plugins and sdk dependency
|
|
COPY ./package.json ./pnpm-lock.yaml ./pnpm-workspace.yaml ./tsconfig.json ./.npmrc ./
|
|
COPY ./packages ./packages
|
|
COPY ./plugins ./plugins
|
|
RUN pnpm install
|
|
|
|
# Copy source
|
|
COPY . .
|
|
RUN pnpm install
|
|
|
|
# Build and cleanup
|
|
ENV NODE_ENV=production
|
|
RUN pnpm run build
|
|
|
|
# Install plugins(whitelist)
|
|
RUN pnpm run plugin:install com.msgbyte.tasks com.msgbyte.linkmeta com.msgbyte.github com.msgbyte.simplenotify
|
|
|
|
# Copy public files
|
|
RUN mkdir -p ./dist/public && cp -r ./public/plugins ./dist/public && cp ./public/registry.json ./dist/public
|
|
|
|
# web static service port
|
|
EXPOSE 3000
|
|
|
|
# Start server
|
|
CMD ["pnpm", "start:service"]
|