2026-01-01 21:34:05 +00:00
|
|
|
version: "3.8"
|
|
|
|
|
|
2017-04-19 14:48:21 +00:00
|
|
|
services:
|
2026-01-01 21:57:45 +00:00
|
|
|
netbox: &netbox
|
2026-01-04 03:55:25 +00:00
|
|
|
image: docker.io/netboxcommunity/netbox:v4.4-3.4.1
|
2018-08-13 21:04:09 +00:00
|
|
|
depends_on:
|
2026-01-04 03:56:47 +00:00
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis-cache:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
env_file: env/netbox.env
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: curl -fsS http://localhost:8080/login/ || exit 1
|
|
|
|
|
start_period: 300s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
interval: 20s
|
|
|
|
|
retries: 10
|
2026-01-01 21:34:05 +00:00
|
|
|
networks:
|
2026-01-04 03:42:50 +00:00
|
|
|
Vlan1:
|
|
|
|
|
ipv4_address: 172.31.240.60
|
2026-01-01 21:34:05 +00:00
|
|
|
NetBoxNet: {}
|
2018-08-13 21:04:09 +00:00
|
|
|
volumes:
|
2026-01-04 03:50:27 +00:00
|
|
|
- /share/Container/netbox/configuration:/etc/netbox/config:rw
|
2026-01-01 21:34:05 +00:00
|
|
|
- /share/Container/netbox/media:/opt/netbox/netbox/media:rw
|
|
|
|
|
- /share/Container/netbox/reports:/opt/netbox/netbox/reports:rw
|
|
|
|
|
- /share/Container/netbox/scripts:/opt/netbox/netbox/scripts:rw
|
|
|
|
|
|
2026-01-01 21:56:20 +00:00
|
|
|
netbox-worker:
|
|
|
|
|
<<: *netbox
|
2018-08-13 21:04:09 +00:00
|
|
|
depends_on:
|
2022-10-22 13:40:03 +00:00
|
|
|
netbox:
|
|
|
|
|
condition: service_healthy
|
2021-09-03 10:48:30 +00:00
|
|
|
command:
|
2024-09-03 18:22:55 +00:00
|
|
|
- /opt/netbox/venv/bin/python
|
|
|
|
|
- /opt/netbox/netbox/manage.py
|
|
|
|
|
- rqworker
|
2026-01-01 21:34:05 +00:00
|
|
|
networks:
|
|
|
|
|
NetBoxNet: {}
|
2022-10-22 13:40:03 +00:00
|
|
|
healthcheck:
|
2024-04-19 19:14:21 +00:00
|
|
|
test: ps -aux | grep -v grep | grep -q rqworker || exit 1
|
2022-10-22 13:40:03 +00:00
|
|
|
start_period: 20s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
interval: 15s
|
2020-10-18 13:16:16 +00:00
|
|
|
|
2018-08-13 21:04:09 +00:00
|
|
|
postgres:
|
2026-01-04 03:55:25 +00:00
|
|
|
image: docker.io/postgres:16-alpine
|
2026-01-01 21:34:05 +00:00
|
|
|
env_file: env/postgres.env
|
|
|
|
|
networks:
|
|
|
|
|
NetBoxNet:
|
|
|
|
|
ipv4_address: 172.31.30.10
|
2024-04-19 15:11:14 +00:00
|
|
|
healthcheck:
|
2024-04-19 19:14:21 +00:00
|
|
|
test: pg_isready -q -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER
|
|
|
|
|
start_period: 20s
|
2024-04-19 15:11:14 +00:00
|
|
|
timeout: 30s
|
2024-04-19 19:14:21 +00:00
|
|
|
interval: 10s
|
2024-04-19 15:11:14 +00:00
|
|
|
retries: 5
|
2018-08-13 21:04:09 +00:00
|
|
|
volumes:
|
2026-01-01 21:34:05 +00:00
|
|
|
- /share/Container/netbox/postgres:/var/lib/postgresql/data
|
2020-10-18 13:16:16 +00:00
|
|
|
|
2020-10-20 07:07:19 +00:00
|
|
|
redis:
|
2025-02-17 22:53:25 +00:00
|
|
|
image: docker.io/valkey/valkey:8.1-alpine
|
2026-01-01 21:34:05 +00:00
|
|
|
env_file: env/redis.env
|
2018-08-13 22:19:29 +00:00
|
|
|
command:
|
2024-09-03 18:22:55 +00:00
|
|
|
- sh
|
2026-01-01 21:34:05 +00:00
|
|
|
- -c
|
|
|
|
|
- valkey-server --appendonly yes --requirepass $$REDIS_PASSWORD
|
|
|
|
|
networks:
|
|
|
|
|
NetBoxNet:
|
|
|
|
|
ipv4_address: 172.31.30.11
|
2024-04-19 19:14:21 +00:00
|
|
|
healthcheck: &redis-healthcheck
|
2024-09-03 18:22:55 +00:00
|
|
|
test: '[ $$(valkey-cli --pass "$${REDIS_PASSWORD}" ping) = ''PONG'' ]'
|
2024-04-19 19:14:21 +00:00
|
|
|
start_period: 5s
|
2024-04-19 15:11:06 +00:00
|
|
|
timeout: 3s
|
2024-04-19 19:14:21 +00:00
|
|
|
interval: 1s
|
2024-04-19 15:11:06 +00:00
|
|
|
retries: 5
|
2018-08-13 21:04:09 +00:00
|
|
|
volumes:
|
2026-01-01 21:34:05 +00:00
|
|
|
- /share/Container/netbox/redis:/data
|
|
|
|
|
|
2019-12-16 11:51:59 +00:00
|
|
|
redis-cache:
|
2025-02-17 22:53:25 +00:00
|
|
|
image: docker.io/valkey/valkey:8.1-alpine
|
2026-01-01 21:34:05 +00:00
|
|
|
env_file: env/redis-cache.env
|
2019-12-16 11:51:59 +00:00
|
|
|
command:
|
2024-09-03 18:22:55 +00:00
|
|
|
- sh
|
2026-01-01 21:34:05 +00:00
|
|
|
- -c
|
|
|
|
|
- valkey-server --requirepass $$REDIS_PASSWORD
|
|
|
|
|
networks:
|
|
|
|
|
NetBoxNet:
|
|
|
|
|
ipv4_address: 172.31.30.12
|
2024-04-19 19:14:21 +00:00
|
|
|
healthcheck: *redis-healthcheck
|
2022-09-23 12:33:49 +00:00
|
|
|
volumes:
|
2026-01-01 21:34:05 +00:00
|
|
|
- /share/Container/netbox/redis-cache:/data
|
|
|
|
|
|
|
|
|
|
networks:
|
2026-01-04 03:42:50 +00:00
|
|
|
Vlan1:
|
2026-01-01 21:34:05 +00:00
|
|
|
external: true
|
2020-10-18 13:16:16 +00:00
|
|
|
|
2026-01-01 21:34:05 +00:00
|
|
|
NetBoxNet:
|
|
|
|
|
driver: bridge
|
|
|
|
|
ipam:
|
|
|
|
|
config:
|
|
|
|
|
- subnet: 172.31.30.0/24
|