Fix: remove server.js.bkp, fix docker-compose network, remove debug log #2

Closed
opened 2026-03-21 23:32:16 +00:00 by murray · 0 comments
Owner

Problems

1. Remove server.js.bkp

Backup file should not be in the repo.

git rm server.js.bkp

2. Fix docker-compose.yml — remove caddy_default network

The compose file references an external caddy_default network from an old Caddy reverse proxy setup. This will cause docker-compose up to fail on any fresh machine.

Remove the caddy_default network from the service and from the top-level networks: block. The compose file should look like:

version: '3.8'

services:
  docxtemplater-service:
    build: .
    ports:
      - "3000:3000"
    environment:
      - PORT=3000
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s

3. Remove debug console.log in server.js

Line ~39 has a stray console.log(templateData) — remove it. This leaks request data to stdout in production.

Git

cd /path/to/docxtemplater-server
git rm server.js.bkp
# edit docker-compose.yml and server.js
git add -A && git commit -m "fix: remove bkp file, fix compose network, remove debug log" && git push

Use remote URL with token: https://otis:<GITEA_TOKEN>@gitea.netcups.al3dev.link/monkey-island/docxtemplater-server.git
Token in /root/.openclaw/workspace/.gitea-credentials.

When Done

Run: openclaw system event --text "Done: docxtemplater-server cleanup (issue #2)" --mode now

## Problems ### 1. Remove `server.js.bkp` Backup file should not be in the repo. ```bash git rm server.js.bkp ``` ### 2. Fix `docker-compose.yml` — remove caddy_default network The compose file references an external `caddy_default` network from an old Caddy reverse proxy setup. This will cause `docker-compose up` to fail on any fresh machine. Remove the `caddy_default` network from the service and from the top-level `networks:` block. The compose file should look like: ```yaml version: '3.8' services: docxtemplater-service: build: . ports: - "3000:3000" environment: - PORT=3000 restart: unless-stopped healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"] interval: 30s timeout: 10s retries: 3 start_period: 10s ``` ### 3. Remove debug `console.log` in `server.js` Line ~39 has a stray `console.log(templateData)` — remove it. This leaks request data to stdout in production. ## Git ```bash cd /path/to/docxtemplater-server git rm server.js.bkp # edit docker-compose.yml and server.js git add -A && git commit -m "fix: remove bkp file, fix compose network, remove debug log" && git push ``` Use remote URL with token: `https://otis:<GITEA_TOKEN>@gitea.netcups.al3dev.link/monkey-island/docxtemplater-server.git` Token in `/root/.openclaw/workspace/.gitea-credentials`. ## When Done Run: `openclaw system event --text "Done: docxtemplater-server cleanup (issue #2)" --mode now`
murray added the
bug
otis
P1-high
labels 2026-03-21 23:32:16 +00:00
Sign in to join this conversation.
No description provided.