From e4aaee7ff02c870548acde141e3c876664c65f3d Mon Sep 17 00:00:00 2001 From: HRiggs Date: Mon, 6 Oct 2025 00:27:44 -0400 Subject: [PATCH] new build --- Bot/Dockerfile | 6 +++--- DOCKER_SETUP.md | 14 ++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Bot/Dockerfile b/Bot/Dockerfile index c98d7ee..b38bb6c 100644 --- a/Bot/Dockerfile +++ b/Bot/Dockerfile @@ -5,10 +5,10 @@ FROM node:18-alpine WORKDIR /app # Copy package files -COPY package*.json ./ +COPY package.json ./ -# Install dependencies -RUN npm ci --only=production +# Install dependencies (npm install works without package-lock.json) +RUN npm install --omit=dev --no-audit --no-fund && npm cache clean --force # Copy application code COPY . . diff --git a/DOCKER_SETUP.md b/DOCKER_SETUP.md index 2340e0e..549e3bc 100644 --- a/DOCKER_SETUP.md +++ b/DOCKER_SETUP.md @@ -125,21 +125,27 @@ docker stats ### Common Issues -1. **Bot not connecting to Discord** +1. **Docker build fails with npm ci error** + ``` + npm error The `npm ci` command can only install with an existing package-lock.json + ``` + **Solution:** The Dockerfile uses `npm install` instead of `npm ci` to work without a lock file. + +2. **Bot not connecting to Discord** - Verify `DISCORD_TOKEN` is correct - Check Discord bot permissions - Ensure bot is invited to the server -2. **Backend not responding** +3. **Backend not responding** - Verify `UPTIME_KUMA_URL` and `UPTIME_KUMA_API_KEY` - Check Uptime Kuma instance accessibility - Test API endpoint manually: `curl http://localhost:8080/back-end.php` -3. **Permission errors** +4. **Permission errors** - Ensure Docker has proper permissions - Check file ownership in mounted volumes -4. **Container health checks failing** +5. **Container health checks failing** - Check logs: `docker-compose logs` - Verify all environment variables are set - Test individual services