Skip to content

Add Custom Scripts to Netbox Docker Container (And Backup) #6085

Answered by candlerb
KSBolton asked this question in Q&A
Discussion options

You must be logged in to vote

I am guessing you're running under docker-compose? If so, and you look in the docker-compose.yml file you'll see:

    volumes:
...
    - ./scripts:/etc/netbox/scripts:z,ro

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.

I also want to backup the instance regularly. Any documented way to do that in my Docker situation?

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…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@KSBolton
Comment options

@candlerb
Comment options

@KSBolton
Comment options

Answer selected by KSBolton
Comment options

You must be logged in to vote
3 replies
@candlerb
Comment options

@feland207
Comment options

@candlerb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants