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.
35 lines
860 B
Docker
35 lines
860 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 ./server/packages ./server/packages
|
|
COPY ./server/plugins ./server/plugins
|
|
COPY ./server/package.json ./server/package.json
|
|
COPY ./package.json ./pnpm-lock.yaml ./pnpm-workspace.yaml ./.npmrc ./
|
|
RUN pnpm install
|
|
|
|
# Copy source
|
|
COPY . .
|
|
RUN pnpm install
|
|
|
|
# Build and cleanup
|
|
ENV NODE_ENV=production
|
|
RUN cd server && \
|
|
pnpm run build && \
|
|
# Install plugins(whitelist)
|
|
pnpm run plugin:install com.msgbyte.tasks com.msgbyte.linkmeta com.msgbyte.github com.msgbyte.simplenotify
|
|
|
|
# Copy public files
|
|
RUN cd server && 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"]
|