mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-10 01:06:17 +00:00
feat: update Dockerfile and documentation for platform-specific dependency generation
This commit is contained in:
@@ -3,6 +3,8 @@ node_modules/
|
|||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
# Let Docker generate platform-specific lockfile
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
# Build outputs
|
# Build outputs
|
||||||
dist/
|
dist/
|
||||||
|
|||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -15,4 +15,8 @@ accounts.main.jsonc
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.playwright-chromium-installed
|
.playwright-chromium-installed
|
||||||
*.log
|
*.log
|
||||||
.update-backup/
|
.update-backup/
|
||||||
|
|
||||||
|
# Exclude package-lock.json from repo for cross-platform compatibility
|
||||||
|
# Each platform (Windows/Linux/Raspberry Pi/Docker) generates its own
|
||||||
|
package-lock.json
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ WORKDIR /usr/src/microsoft-rewards-script
|
|||||||
ENV PLAYWRIGHT_BROWSERS_PATH=0
|
ENV PLAYWRIGHT_BROWSERS_PATH=0
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY package.json package-lock.json tsconfig.json ./
|
COPY package.json tsconfig.json ./
|
||||||
|
|
||||||
# Install all dependencies required to build the script
|
# Generate fresh lockfile for target platform architecture
|
||||||
RUN npm ci --ignore-scripts
|
# This ensures native dependencies are resolved correctly
|
||||||
|
RUN npm install --ignore-scripts --package-lock-only \
|
||||||
|
&& npm ci --ignore-scripts
|
||||||
|
|
||||||
# Copy source and build
|
# Copy source and build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
@@ -186,6 +186,21 @@ docker inspect --format='{{.State.Health.Status}}' microsoft-rewards-script
|
|||||||
|
|
||||||
## ⚠️ Important Notes
|
## ⚠️ Important Notes
|
||||||
|
|
||||||
|
### Platform Compatibility
|
||||||
|
|
||||||
|
The Docker build **automatically generates platform-specific dependencies** for the target architecture:
|
||||||
|
|
||||||
|
- ✅ **Windows (x86_64)** — Fully supported
|
||||||
|
- ✅ **Linux (x86_64)** — Fully supported
|
||||||
|
- ✅ **Raspberry Pi (ARM64)** — Fully supported
|
||||||
|
- ✅ **macOS (ARM64/Apple Silicon)** — Fully supported
|
||||||
|
|
||||||
|
The build process regenerates `package-lock.json` inside the container to ensure native dependencies (Playwright, etc.) match the target platform. This means:
|
||||||
|
|
||||||
|
- **No cross-platform compatibility issues**
|
||||||
|
- **Native performance on all architectures**
|
||||||
|
- **Raspberry Pi users won't encounter binary mismatch errors**
|
||||||
|
|
||||||
### Buy Mode Not Supported
|
### Buy Mode Not Supported
|
||||||
|
|
||||||
**Buy Mode cannot be used in Docker** because it requires interactive terminal input. Use Buy Mode only in local installations:
|
**Buy Mode cannot be used in Docker** because it requires interactive terminal input. Use Buy Mode only in local installations:
|
||||||
|
|||||||
Reference in New Issue
Block a user