# This dockerfile spins up an instance of tachi-server and *tachi-server* alone. # It does not spin up mongodb instances or redis instances, which the server # does need to boot. You should consider using docker-compose for this. FROM node:16-alpine as base ARG COMMIT_HASH ENV COMMIT_HASH=${COMMIT_HASH} RUN npm install --silent -g pnpm RUN apk add --no-cache FROM base AS build WORKDIR /app COPY pnpm-lock.yaml . RUN pnpm fetch COPY . . RUN pnpm install -r --offline --silent WORKDIR /app/server RUN pnpm build FROM base AS app WORKDIR /app/server COPY --from=build /app /app HEALTHCHECK --interval=15s --timeout=5s CMD curl -f http://localhost:8080/api/v1/status || exit 1 ENV NODE_PATH=js/ CMD ["pnpm", "start-no-build"]