mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Compare commits
6 Commits
pr-1279
...
3567906fcd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3567906fcd | ||
|
|
be6801d98f | ||
|
|
bb9b242d0a | ||
|
|
5f27d3b9aa | ||
|
|
93af0e9d19 | ||
|
|
398e2a896f |
@@ -33,6 +33,11 @@ Get visibility of what's going on on your WIFI/LAN network and enable presence d
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
> [!WARNING]
|
||||
> ⚠️ **Important:** The documentation has been recently updated and some instructions may have changed.
|
||||
> If you are using the currently live production image, please follow the instructions on [Docker Hub](https://hub.docker.com/r/jokobsk/netalertx) for building and running the container.
|
||||
> These docs reflect the latest development version and may differ from the production image.
|
||||
|
||||
Start NetAlertX in seconds with Docker:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -85,10 +85,10 @@ services:
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/config:/home/pi/pialert/config
|
||||
- local/path/db:/home/pi/pialert/db
|
||||
- /local/path/config:/home/pi/pialert/config
|
||||
- /local/path/db:/home/pi/pialert/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/home/pi/pialert/front/log
|
||||
- /local/path/logs:/home/pi/pialert/front/log
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- PORT=20211
|
||||
@@ -104,10 +104,10 @@ services:
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/config:/data/config # 🆕 This has changed
|
||||
- local/path/db:/data/db # 🆕 This has changed
|
||||
- /local/path/config:/data/config # 🆕 This has changed
|
||||
- /local/path/db:/data/db # 🆕 This has changed
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/tmp/log # 🆕 This has changed
|
||||
- /local/path/logs:/tmp/log # 🆕 This has changed
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- PORT=20211
|
||||
@@ -131,10 +131,10 @@ services:
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/config/pialert.conf:/home/pi/pialert/config/pialert.conf
|
||||
- local/path/db/pialert.db:/home/pi/pialert/db/pialert.db
|
||||
- /local/path/config/pialert.conf:/home/pi/pialert/config/pialert.conf
|
||||
- /local/path/db/pialert.db:/home/pi/pialert/db/pialert.db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/home/pi/pialert/front/log
|
||||
- /local/path/logs:/home/pi/pialert/front/log
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- PORT=20211
|
||||
@@ -150,10 +150,10 @@ services:
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/config/app.conf:/data/config/app.conf # 🆕 This has changed
|
||||
- local/path/db/app.db:/data/db/app.db # 🆕 This has changed
|
||||
- /local/path/config/app.conf:/data/config/app.conf # 🆕 This has changed
|
||||
- /local/path/db/app.db:/data/db/app.db # 🆕 This has changed
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/tmp/log # 🆕 This has changed
|
||||
- /local/path/logs:/tmp/log # 🆕 This has changed
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- PORT=20211
|
||||
@@ -190,10 +190,10 @@ services:
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/config:/data/config
|
||||
- local/path/db:/data/db
|
||||
- /local/path/config:/data/config
|
||||
- /local/path/db:/data/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/tmp/log
|
||||
- /local/path/logs:/tmp/log
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- PORT=20211
|
||||
@@ -207,10 +207,10 @@ services:
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/config:/data/config
|
||||
- local/path/db:/data/db
|
||||
- /local/path/config:/data/config
|
||||
- /local/path/db:/data/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/tmp/log
|
||||
- /local/path/logs:/tmp/log
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- PORT=20211
|
||||
@@ -234,10 +234,10 @@ services:
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/config:/data/config
|
||||
- local/path/db:/data/db
|
||||
- /local/path/config:/data/config
|
||||
- /local/path/db:/data/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
- local/path/logs:/tmp/log
|
||||
- /local/path/logs:/tmp/log
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- PORT=20211
|
||||
@@ -253,11 +253,19 @@ services:
|
||||
|
||||
```sh
|
||||
docker run -it --rm --name netalertx --user "0" \
|
||||
-v local/path/config:/data/config \
|
||||
-v local/path/db:/data/db \
|
||||
-v /local/path/config:/data/config \
|
||||
-v /local/path/db:/data/db \
|
||||
ghcr.io/jokob-sk/netalertx:latest
|
||||
```
|
||||
|
||||
..or alternatively execute:
|
||||
|
||||
```bash
|
||||
sudo chown -R 20211:20211 /local/path/config
|
||||
sudo chown -R 20211:20211 /local/path/db
|
||||
sudo chmod -R a+rwx /local/path/
|
||||
```
|
||||
|
||||
7. Stop the container
|
||||
8. Update the `docker-compose.yml` as per example below.
|
||||
|
||||
@@ -273,10 +281,10 @@ services:
|
||||
- NET_BIND_SERVICE # 🆕 New line
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- local/path/config:/data/config
|
||||
- local/path/db:/data/db
|
||||
- /local/path/config:/data/config
|
||||
- /local/path/db:/data/db
|
||||
# (optional) useful for debugging if you have issues setting up the container
|
||||
#- local/path/logs:/tmp/log
|
||||
#- /local/path/logs:/tmp/log
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- PORT=20211
|
||||
|
||||
@@ -14,7 +14,7 @@ from const import confFileName, logPath
|
||||
from utils.datetime_utils import timeNowDB
|
||||
from plugin_helper import Plugin_Objects
|
||||
from logger import mylog, Logger
|
||||
from helper import timeNowTZ, get_setting_value
|
||||
from helper import get_setting_value
|
||||
from models.notification_instance import NotificationInstance
|
||||
from database import DB
|
||||
from pytz import timezone
|
||||
|
||||
@@ -21,7 +21,7 @@ from const import confFileName, logPath
|
||||
from plugin_helper import Plugin_Objects
|
||||
from utils.datetime_utils import timeNowDB
|
||||
from logger import mylog, Logger
|
||||
from helper import timeNowTZ, get_setting_value, hide_email
|
||||
from helper import get_setting_value, hide_email
|
||||
from models.notification_instance import NotificationInstance
|
||||
from database import DB
|
||||
from pytz import timezone
|
||||
|
||||
@@ -13,9 +13,6 @@ sys.path.extend([f"{INSTALL_PATH}/server"])
|
||||
|
||||
from const import apiPath
|
||||
from logger import mylog
|
||||
from helper import (
|
||||
timeNowTZ,
|
||||
)
|
||||
|
||||
import conf
|
||||
from const import applicationPath, logPath, apiPath, confFileName, reportTemplatesPath
|
||||
@@ -23,6 +20,9 @@ from logger import mylog
|
||||
from utils.datetime_utils import timeNowDB
|
||||
|
||||
|
||||
NOTIFICATION_API_FILE = apiPath + 'user_notifications.json'
|
||||
|
||||
|
||||
# Show Frontend User Notification
|
||||
def write_notification(content, level="alert", timestamp=None):
|
||||
"""
|
||||
|
||||
@@ -19,7 +19,6 @@ INSTALL_PATH = os.getenv("NETALERTX_APP", "/app")
|
||||
sys.path.extend([f"{INSTALL_PATH}/server"])
|
||||
|
||||
from helper import (
|
||||
get_timezone_offset,
|
||||
get_setting_value,
|
||||
)
|
||||
from logger import mylog
|
||||
|
||||
@@ -14,7 +14,6 @@ from helper import (
|
||||
removeDuplicateNewLines,
|
||||
write_file,
|
||||
get_setting_value,
|
||||
get_timezone_offset,
|
||||
)
|
||||
from messaging.in_app import write_notification
|
||||
from utils.datetime_utils import timeNowDB, get_timezone_offset
|
||||
|
||||
@@ -11,7 +11,7 @@ from datetime import datetime, timedelta
|
||||
INSTALL_PATH = os.getenv('NETALERTX_APP', '/app')
|
||||
sys.path.extend([f"{INSTALL_PATH}/front/plugins", f"{INSTALL_PATH}/server"])
|
||||
|
||||
from helper import timeNowTZ, get_setting_value
|
||||
from helper import get_setting_value
|
||||
from api_server.api_server_start import app
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
||||
Reference in New Issue
Block a user