Files
zkldi_Tachi/Dockerfile.server
T

35 lines
850 B
Docker

# 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 git curl
FROM base AS build
WORKDIR /app
COPY pnpm-lock.yaml .
RUN pnpm fetch
COPY server ./server
COPY common ./common
COPY patches ./patches
COPY *.json *.yaml ./
RUN pnpm --filter tachi-server... --filter . install --offline
RUN pnpm --filter tachi-server... -r build
FROM base AS app
COPY --from=build /app /app
HEALTHCHECK --interval=15s --timeout=5s CMD curl -f http://localhost:8080/api/v1/status || exit 1
WORKDIR /app/server
ENV NODE_PATH=js/
CMD ["node", "js/main.js"]