FROM node:20-bullseye # Install Rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" # Set working directory WORKDIR /app # Copy the church-core dependency first COPY church-core /church-core # Copy package files COPY astro-church-website/package*.json ./ # Install Node dependencies RUN npm install # Copy source code COPY astro-church-website . # Build native bindings and Astro site RUN npm run build # Create output directory RUN mkdir -p /output && \ cp -r dist/ /output/ && \ cp *.node /output/ && \ cp package.json index.* *.cjs *.mjs /output/ 2>/dev/null || true