-
Hello all. I hope this is the right place to ask this. I've just started using Netbox and I installed it the super easy way where I'm running it in a Docker container. It works great so far. Recently I wanted to include a script that would check for duplicate IPs so I hopped into bash in the container and used vi to make the .py file but the entire volume holding /etc/netbox/scripts is read-only. Is it possible to add custom scripts to the Docker version? Do I need to mess with the Dockerfile? Separate item: I also want to backup the instance regularly. Any documented way to do that in my Docker situation? Any help or links to resources that could would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I am guessing you're running under docker-compose? If so, and you look in the docker-compose.yml file you'll see:
So the solution is to drop the script into the
docker-compose isn't really a great way to run Netbox in production. However, the thing you need to do is to backup the Postgres database, as described here. You may need to tweak this to do |
Beta Was this translation helpful? Give feedback.
-
Hello, I placed my script in This is a simple script that will get list of devices + IP interfaces from Netbox and will generate a config template. |
Beta Was this translation helpful? Give feedback.
I am guessing you're running under docker-compose? If so, and you look in the docker-compose.yml file you'll see:
So the solution is to drop the script into the
./scripts/
local directory on the host where you run docker-compose, and it will magically appear in the Netbox container. It's read-only so that Netbox itself can't (accidentally or maliciously) modify the script.docker-compose isn't really a great way to run Netbox in production. However, the thing you need to do is to backup the Postgres database, as described here. Yo…