File size: 717 Bytes
a361f32 7d77bcc a361f32 7d77bcc a361f32 7d77bcc a361f32 7d77bcc a361f32 7d77bcc a361f32 7d77bcc a361f32 7d77bcc a361f32 7d77bcc a361f32 8fe4101 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # 1. Use Node.js 20
FROM node:20-alpine
# 2. Install pnpm globally
RUN npm install -g pnpm
# 3. Set the working directory
WORKDIR /app
# 4. Copy configuration files
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json .npmrc ./
COPY tsconfig.json tsconfig.base.json ./
# 5. Copy the entire project
COPY . .
# 6. Install dependencies with platform-specific fix
# This tells pnpm to specifically fetch the Linux binaries needed for Rollup/Vite
RUN pnpm config set supported-architectures ["linux-x64-musl"]
RUN pnpm install
# 7. Build the libraries and then the apps
RUN pnpm run build
# 8. Hugging Face port configuration
ENV PORT=7860
EXPOSE 7860
# 9. Start the multiplayer server
CMD ["pnpm", "run", "start"] |