Replies: 1 comment
|
Hi there, I'll try to help. Can you post how your data folder structure looks? For example, here's how I have my Docker app data set up: jokob@Synology-NAS:/volume2/docker_appdata$ ls | grep netalertx
netalertx
netalertx_dev
netalertx_empty
netalertx_fresh
netalertx_prod
netalertx_temp
netalertx_testSample structure inside one of the folders: jokob@Synology-NAS:/volume2/docker_appdata/netalertx_prod$ tree .
.
├── config
│ ├── app.conf
│ ├── app_conf_override.json
│ └── devices.csv
└── db
├── app.db
├── app.db-shm
└── app.db-wal
3 directories, 15 filesSo if I were to run the container, the volume mapping would look something like: docker run -d \
--network=host \
--restart unless-stopped \
-v /volume2/docker_appdata/netalertx_prod:/data \
-v /etc/localtime:/etc/localtime:ro \
--tmpfs /tmp:uid=20211,gid=20211,mode=1700 \
-e PORT=20211 \
-e APP_CONF_OVERRIDE='{"GRAPHQL_PORT":"20214"}' \
ghcr.io/netalertx/netalertx:latestNotice the host path: /volume2/docker_appdata/netalertx_prodThis entire folder is mounted to You can also pre-create the Also, the permission errors are a bit concerning: chown: Operation not permitted
chmod: Operation not permittedThose commands would normally succeed on a local Linux filesystem. Can you tell us a bit more about where
Could you also post: ls -ld /local_data_dir /local_data_dir/config /local_data_dir/dband the container logs: docker logs <container_name>The logs should tell us more and why nothing is listening on port 20211. |
Uh oh!
There was an error while loading. Please reload this page.
Struggling to get NetAlertX running. The image pulls, builds the container and starts. The URL is denied, presumably permissions. I have added notes form my install effort below. Any help is most appreciated. Be gentle, this is my first Docker install. ;)
Copy/Paste from https://github.com/netalertx/NetAlertX/
docker run -d
--network=host
--restart unless-stopped
-v /local_data_dir:/data
-v /etc/localtime:/etc/localtime:ro
--tmpfs /tmp:uid=20211,gid=20211,mode=1700
-e PORT=20211
-e APP_CONF_OVERRIDE='{"GRAPHQL_PORT":"20214"}'
ghcr.io/netalertx/netalertx:latest
Image pulls without issue, Portainer shows the new container/image.
Portainer container for NetAlertX is flagged 'unhealthy'
URL (http://192.168.0.50:20211/) replies '192.168.0.50 refused to connect' - (IP is that of the RasPi hosting Docker)
Confirmed port 20211 is not used by another image/application
confirmed dir has the required files (configm, db)
dockeruser@Docker:/local_data_dir $ ls
config db
Ensure the config and database directories are owned by the netalertx user:
chown -R 20211:20211 /local_data_dir/config /local_data_dir/db
dockeruser@Docker:/ $ chown -R 20211:20211 /local_data_dir/config /local_data_dir/db
chown: changing ownership of '/local_data_dir/config/app_conf_override.json': Operation not permitted
chown: changing ownership of '/local_data_dir/config/app.conf': Operation not permitted
chown: changing ownership of '/local_data_dir/config': Operation not permitted
chown: changing ownership of '/local_data_dir/db/app.db': Operation not permitted
chown: changing ownership of '/local_data_dir/db': Operation not permitted
Set appropriate permissions:
chmod -R 755 /local_data_dir/config /local_data_dir/db
chmod: changing permissions of '/local_data_dir/config': Operation not permitted
chmod: changing permissions of '/local_data_dir/config/app_conf_override.json': Operation not permitted
chmod: changing permissions of '/local_data_dir/config/app.conf': Operation not permitted
chmod: changing permissions of '/local_data_dir/db': Operation not permitted
chmod: changing permissions of '/local_data_dir/db/app.db': Operation not permitted
All reactions