fix: use npm install instead of npm ci, change port to 3091
- npm ci requires a package-lock.json; use npm install --omit=dev instead - Change all port references from 3001 to 3091 (3001 is occupied) - docker-compose.yml: ports, PORT env, healthcheck URL - Dockerfile: EXPOSE - .env.example: PORT default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
PORT=3001
|
||||
PORT=3091
|
||||
DB_PATH=/data/bots.db
|
||||
NODE_ENV=production
|
||||
# Set a strong random token — all WP sites must send this as: Authorization: Bearer <token>
|
||||
|
||||
@@ -5,13 +5,13 @@ RUN apk add --no-cache python3 make g++
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
RUN npm install --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p /data
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 3091
|
||||
VOLUME ["/data"]
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
@@ -4,16 +4,16 @@ services:
|
||||
container_name: bot-api
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3001:3001"
|
||||
- "3091:3091"
|
||||
volumes:
|
||||
- bot-data:/data
|
||||
environment:
|
||||
- PORT=3001
|
||||
- PORT=3091
|
||||
- DB_PATH=/data/bots.db
|
||||
- NODE_ENV=production
|
||||
- API_TOKEN=${API_TOKEN:-change-me-to-a-long-random-string}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/v1/health"]
|
||||
test: ["CMD", "wget", "-qO-", "http://localhost:3091/api/v1/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
Reference in New Issue
Block a user