refactor: asset service & markdown render asset

This commit is contained in:
Innei
2021-09-27 10:55:58 +08:00
parent 28ec5ae177
commit 29618d27f5
17 changed files with 72 additions and 880 deletions

View File

@@ -21,14 +21,18 @@
FROM node:16-alpine as builder
WORKDIR /app
COPY . .
RUN apk add git
RUN npm i -g pnpm
RUN pnpm install
RUN pnpm bundle
RUN git clone https://github.com/mx-space/assets.git --depth=1
RUN rm -rf assets/.git
FROM node:16-alpine
RUN apk add zip unzip mongodb-tools --no-cache
WORKDIR /app
COPY --from=builder /app/out .
COPY --from=builder /app/assets ./assets
EXPOSE 2333
CMD node index.js --redis_host=redis --db_host=mongo