new file: .env

new file:   Containerfile
new file:   README.md
new file:   compose.yml
new file:   configuration.py
new file:   entrypoint.sh
new file:   local_requirements.txt
new file:   named.conf
new file:   nginx.conf
new file:   rndc.key
This commit is contained in:
Sven Luethi authored and Sven Luthi committed 2026-07-20 12:26:51 +02:00
commit 136ee48052
10 files changed
+593

No files matched your search

+128
View File
@@ -0,0 +1,128 @@
name: netbox
services:
# __ PostgreSQL ______________________________________________
postgres:
image: git.luethi.co/sven/netbox-stack/postgres:16-alpine
restart: unless-stopped
network_mode: host
environment:
POSTGRES_DB: netbox
POSTGRES_USER: netbox
POSTGRES_PASSWORD: netbox
volumes:
- postgres_data:/var/lib/postgresql/data:U
healthcheck:
test: ["CMD-SHELL", "pg_isready -U netbox"]
interval: 10s
timeout: 5s
retries: 5
# __ Redis ___________________________________________________
redis:
image: git.luethi.co/sven/netbox-stack/redis:7-alpine
restart: unless-stopped
network_mode: host
command: redis-server --save 60 1
volumes:
- redis_data:/data:U
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
# __ NetBox web (Gunicorn) ___________________________________
netbox:
image: git.luethi.co/sven/netbox-stack/netbox:${NETBOX_VERSION}
build:
context: .
dockerfile: Containerfile
network: host
args:
NETBOX_VERSION: ${NETBOX_VERSION}
PYTHON_VERSION: ${PYTHON_VERSION}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
restart: unless-stopped
network_mode: host
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./configuration.py:/opt/netbox/netbox/netbox/configuration.py:ro
- netbox_custom_scripts:/opt/netbox/netbox/scripts:ro
- netbox_media:/opt/netbox/netbox/media:U
- netbox_static:/opt/netbox/netbox/static:U
environment:
GUNICORN_BIND: "localhost:8085"
GUNICORN_WORKERS: 4
GUNICORN_THREADS: 3
GUNICORN_TIMEOUT: 120
GUNICORN_MAX_REQUESTS: 5000
GUNICORN_MAX_REQUESTS_JITTER: 500
command: gunicorn
healthcheck:
test: ["CMD", "python", "/opt/netbox/netbox/manage.py", "check"]
interval: 60s
timeout: 30s
retries: 5
# __ NetBox RQ worker ________________________________________
netbox-worker:
image: git.luethi.co/sven/netbox-stack/netbox:${NETBOX_VERSION}
restart: unless-stopped
network_mode: host
depends_on:
- netbox
volumes:
- ./configuration.py:/opt/netbox/netbox/netbox/configuration.py:ro
- netbox_custom_scripts:/opt/netbox/netbox/scripts:ro
- netbox_media:/opt/netbox/netbox/media:U
- netbox_static:/opt/netbox/netbox/static:U
command: worker
# __ NetBox DNS transfer endpoint ____________________________
netbox-dns-transfer-endpoint:
image: git.luethi.co/sven/netbox-stack/netbox:${NETBOX_VERSION}
restart: unless-stopped
network_mode: host
depends_on:
- netbox
volumes:
- ./configuration.py:/opt/netbox/netbox/netbox/configuration.py:ro
command: dns-transfer-endpoint
# __ NGINX reverse proxy _____________________________________
nginx:
image: git.luethi.co/sven/netbox-stack/nginx:alpine
restart: unless-stopped
network_mode: host
depends_on:
- netbox
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- netbox_static:/static:ro
# __ BIND9 ___________________________________________________
bind9:
image: git.luethi.co/sven/netbox-stack/bind9:9.20
restart: unless-stopped
depends_on:
- netbox-dns-transfer-endpoint
network_mode: host
volumes:
- ./named.conf:/etc/bind/named.conf:ro
- ./rndc.key:/etc/bind/rndc.key:ro
volumes:
postgres_data:
redis_data:
netbox_media:
netbox_static:
netbox_custom_scripts: