Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: Prepare host directories
run: |
mkdir -p netdisco/logs netdisco/config netdisco/nd-site-local
mkdir -p netdisco/config netdisco/nd-site-local
sudo chown -R 901:901 netdisco

- name: Start the stack
Expand Down Expand Up @@ -73,6 +73,28 @@ jobs:
fi
done

- name: Confirm no real log files written (foreground mode)
run: |
# Post netdisco/netdisco#1500: foreground mode skips log file
# creation entirely. The Dockerfile keeps the legacy
# /home/netdisco/logs/netdisco-*.log -> /dev/stdout symlinks as a
# safety net for non-foreground use, so '-type f' excludes those
# and only catches *real* files (which would mean log writes
# accumulating inside the container instead of reaching stdout).
fail=0
for svc in netdisco-backend netdisco-web; do
real=$(docker compose exec -T "$svc" find /home/netdisco/logs \
-maxdepth 1 -type f -name '*.log' 2>/dev/null || true)
if [ -n "$real" ]; then
echo "FAIL: $svc has real log files (expected stdout only):"
echo "$real"
fail=1
else
echo "OK: $svc — no real .log files in /home/netdisco/logs/"
fi
done
exit $fail

- name: Dump compose logs
if: always()
run: docker compose logs --no-color || true
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ On Linux hosts, create these directories and allow the service uid (`901`) to wr

*(this step is only necessary on Linux hosts and can be omitted in the macOS and Windows versions of Docker)*

mkdir -p netdisco/{logs,config,nd-site-local}
mkdir -p netdisco/{config,nd-site-local}
sudo chown -R 901:901 netdisco

### New Deployments
Expand All @@ -35,7 +35,7 @@ Download `compose.yaml` and start everything:

This runs the database, backend daemon, and web frontend listening on port 5000. If you have a device using the SNMP community `public`, enter it in the Netdisco homepage and click "Discover".

The default configuration is available in `netdisco/config/deployment.yml`. The daemons automatically restart when you save changes to this file. Logs are available in `netdisco/logs/`.
The default configuration is available in `netdisco/config/deployment.yml`. The daemons automatically restart when you save changes to this file. Logs are available via `docker compose logs` (the daemons write directly to the container stdout in foreground mode).

The web frontend is initally configured to allow unauthenticated access with full admin rights. We suggest you visit the `Admin -> User Management` menu item, and set `no_auth: false` in `deployment.yml`, to remove this guest account and set up authenticated user access.

Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ services:
volumes:
- "./netdisco/nd-site-local:/home/netdisco/nd-site-local"
- "./netdisco/config:/home/netdisco/environments"
- "./netdisco/logs:/home/netdisco/logs"
environment:
<<: *common-environment
dns_opt:
Expand All @@ -93,7 +92,6 @@ services:
volumes:
- "./netdisco/nd-site-local:/home/netdisco/nd-site-local"
- "./netdisco/config:/home/netdisco/environments"
- "./netdisco/logs:/home/netdisco/logs"
environment:
<<: *common-environment
IPV: '${IPV:-4}'
Expand Down
Loading