28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
FROM node:22.12.0-alpine AS fika-builder
|
|
RUN apk add --no-cache git unzip && \
|
|
git clone -b dev-4.0 --depth=1 https://github.com/project-fika/Fika-Server.git /fika-server && \
|
|
cd /fika-server && \
|
|
npm install && npm run build && \
|
|
mkdir output && cd output && unzip /fika-server/dist/fika-server.zip
|
|
|
|
FROM node:22.12.0-bullseye AS server-builder
|
|
RUN apt update && apt install -y git git-lfs p7zip-full && \
|
|
GIT_LFS_SKIP_SMUDGE=1 git clone -b 4.0.x-DEV --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \
|
|
cd /snapshot && git config -f .lfsconfig lfs.url https://$GITEA_TOKEN:@$GITEA_URL/henry/spt-server.git/info/lfs && git lfs pull && \
|
|
cd project && \
|
|
npm install && npm run build:release && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
FROM debian:bookworm-slim
|
|
LABEL author="AirryCo <henry@stblog.com.cn>"
|
|
ENV TZ=Asia/Shanghai
|
|
COPY --from=server-builder /snapshot/project/build/ /app/spt-server/
|
|
COPY --from=fika-builder /fika-server/output/ /app/spt-server/
|
|
VOLUME /opt/spt-server
|
|
WORKDIR /opt/spt-server
|
|
EXPOSE 6969
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|