diff --git a/docker-compose.yml b/docker-compose.yml index 13a052e..e3c3047 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: web: - build: . + image: sneakyscan container_name: sneakyscanner-web working_dir: /app entrypoint: ["python3", "-u", "-m", "web.app"] @@ -44,7 +44,7 @@ services: - UDP_PORTS=${UDP_PORTS:-53,67,68,69,123,161,500,514,1900} # Scanner functionality requires privileged mode and host network for masscan/nmap privileged: true - networks: [] + network_mode: host # Health check to ensure web service is running healthcheck: test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/settings/health').read()"] @@ -57,7 +57,7 @@ services: # Optional: Initialize database on first run # Run with: docker-compose -f docker-compose-web.yml run --rm init-db init-db: - build: . + image: sneakyscan container_name: sneakyscanner-init-db entrypoint: ["python3"] command: ["init_db.py", "--db-url", "sqlite:////app/data/sneakyscanner.db"] diff --git a/setup.sh b/setup.sh index dc48f02..933aec1 100755 --- a/setup.sh +++ b/setup.sh @@ -107,7 +107,7 @@ echo "Starting SneakyScanner..." echo "This may take a few minutes on first run..." echo "" -podman-compose build +podman build --network=host -t sneakyscan . podman-compose up -d # Wait for service to be healthy