# BossEye Enterprise On-Premises v2.5 — Runtime-Only Container (Linux x64)
FROM gcr.io/distroless/nodejs22-debian12

WORKDIR /app

# Note: Requires prebuilt artifacts/linux-x64/ (via GitHub Actions Linux x64 runner or Docker builder)
# and runtime node_modules/ populated in the staging directory before docker build.
COPY package.json ./package.json
COPY artifacts/linux-x64/bosseye-server.jsc ./dist/bosseye-server.jsc
COPY artifacts/linux-x64/boot.cjs ./dist/boot.cjs
COPY artifacts/linux-x64/bosseye_license_native.node ./native/build/Release/bosseye_license_native.node
COPY db ./db

ENV NODE_ENV=production
ENV PORT=8080
ENV HOST=0.0.0.0

EXPOSE 8080

CMD ["/app/dist/boot.cjs"]
