2024-03-07 19:06:38 +00:00
|
|
|
# tianji reporter
|
|
|
|
FROM golang:1.21.1-bookworm AS reporter
|
|
|
|
WORKDIR /app/reporter
|
2023-10-17 11:41:42 +00:00
|
|
|
|
2024-03-07 19:06:38 +00:00
|
|
|
COPY ./reporter/ ./reporter/
|
2023-10-17 11:41:42 +00:00
|
|
|
|
2024-03-07 19:06:38 +00:00
|
|
|
RUN apt update
|
|
|
|
RUN cd reporter && go build .
|
2023-10-17 11:41:42 +00:00
|
|
|
|
2024-03-07 19:06:38 +00:00
|
|
|
# # Base ------------------------------
|
|
|
|
FROM node:20-alpine AS base
|
2023-10-17 11:41:42 +00:00
|
|
|
|
2024-03-07 19:06:38 +00:00
|
|
|
RUN npm install -g pnpm@8.3.1
|
2024-01-18 18:40:32 +00:00
|
|
|
RUN apk add --update --no-cache python3 py3-pip g++ make
|
2024-01-13 10:16:09 +00:00
|
|
|
|
2024-03-07 19:06:38 +00:00
|
|
|
# Tianji frontend ------------------------------
|
2024-03-08 13:36:23 +00:00
|
|
|
FROM base AS static
|
2024-03-07 19:06:38 +00:00
|
|
|
WORKDIR /app/tianji
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2023-10-17 11:41:42 +00:00
|
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
|
2024-03-07 19:06:38 +00:00
|
|
|
RUN pnpm build:static
|
|
|
|
|
|
|
|
# Tianji server ------------------------------
|
2024-03-08 13:36:23 +00:00
|
|
|
FROM base AS app
|
2024-03-07 19:06:38 +00:00
|
|
|
WORKDIR /app/tianji
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN pnpm install --filter @tianji/server... --config.dedupe-peer-dependents=false
|
|
|
|
|
|
|
|
RUN mkdir -p ./src/server/public
|
2024-03-08 13:36:23 +00:00
|
|
|
COPY --from=static /app/tianji/src/server/public /app/tianji/src/server/public
|
2024-03-07 19:06:38 +00:00
|
|
|
|
|
|
|
RUN pnpm build:server
|
2023-10-17 11:41:42 +00:00
|
|
|
|
2024-01-20 08:22:44 +00:00
|
|
|
RUN pip install apprise --break-system-packages
|
2024-01-18 16:33:10 +00:00
|
|
|
|
2024-01-28 17:00:35 +00:00
|
|
|
RUN rm -rf ./src/client
|
2023-11-07 08:56:16 +00:00
|
|
|
RUN rm -rf ./website
|
|
|
|
RUN rm -rf ./reporter
|
|
|
|
|
2023-10-17 11:41:42 +00:00
|
|
|
EXPOSE 12345
|
|
|
|
|
2023-10-18 16:24:53 +00:00
|
|
|
CMD ["pnpm", "start:docker"]
|