mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-22 23:18:05 +03:00
35 lines
868 B
Docker
35 lines
868 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 .
|
|
COPY patches ./patches
|
|
|
|
RUN pnpm fetch
|
|
|
|
COPY server ./server
|
|
COPY common ./common
|
|
COPY *.json *.yaml ./
|
|
|
|
RUN pnpm --filter tachi-server... --filter . install --offline --frozen-lockfile
|
|
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"]
|