Files
Arch1Panel/apps/netbox/latest/docker-compose.yml

60 lines
1.5 KiB
YAML
Raw Normal View History

2025-07-10 18:54:29 +08:00
version: '3.4'
2025-06-30 23:37:03 +08:00
services:
netbox:
2025-07-10 18:54:29 +08:00
image: netboxcommunity/netbox:latest
2025-06-30 23:37:03 +08:00
restart: always
2025-07-10 18:54:29 +08:00
env_file:
- netbox.env
depends_on:
- postgres
- redis
- redis-cache
2025-06-30 23:37:03 +08:00
ports:
2025-07-10 18:54:29 +08:00
- "${PANEL_APP_PORT_HTTP}:8080"
2025-06-30 23:37:03 +08:00
volumes:
2025-07-10 18:54:29 +08:00
- ./netbox-media:/opt/netbox/netbox/media
- ./netbox-reports:/etc/netbox/reports
- ./netbox-scripts:/etc/netbox/scripts
command: /opt/netbox/launch-netbox.sh
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/health/", "||", "exit", "1"]
interval: 30s
timeout: 10s
retries: 5
2025-06-30 23:37:03 +08:00
labels:
2025-07-10 18:54:29 +08:00
org.opencontainers.image.source: https://github.com/netbox-community/netbox-docker
postgres:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_DB: netbox
POSTGRES_USER: netbox
POSTGRES_PASSWORD: ${PANEL_DB_USER_PASSWORD}
volumes:
- ./postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "netbox"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
redis-cache:
image: redis:7-alpine
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
netbox-media:
netbox-reports:
netbox-scripts:
postgres-data: