File size: 1,630 Bytes
74f2bea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '3.8'

services:
  netbox:
    image: netboxcommunity/netbox:latest
    container_name: overgrowth-netbox
    depends_on:
      - postgres
      - redis
      - redis-cache
    env_file: netbox.env
    ports:
      - "8000:8080"
    volumes:
      - netbox-media:/opt/netbox/netbox/media
      - netbox-reports:/opt/netbox/netbox/reports
      - netbox-scripts:/opt/netbox/netbox/scripts
    restart: unless-stopped

  netbox-worker:
    image: netboxcommunity/netbox:latest
    container_name: overgrowth-netbox-worker
    depends_on:
      - netbox
    env_file: netbox.env
    command: /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py rqworker
    restart: unless-stopped

  netbox-housekeeping:
    image: netboxcommunity/netbox:latest
    container_name: overgrowth-netbox-housekeeping
    depends_on:
      - netbox
    env_file: netbox.env
    command: /opt/netbox/housekeeping.sh
    restart: unless-stopped

  postgres:
    image: postgres:15-alpine
    container_name: overgrowth-postgres
    environment:
      POSTGRES_USER: netbox
      POSTGRES_PASSWORD: netbox_password
      POSTGRES_DB: netbox
    volumes:
      - postgres-data:/var/lib/postgresql/data
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    container_name: overgrowth-redis
    command: redis-server --appendonly yes
    volumes:
      - redis-data:/data
    restart: unless-stopped

  redis-cache:
    image: redis:7-alpine
    container_name: overgrowth-redis-cache
    command: redis-server
    restart: unless-stopped

volumes:
  netbox-media:
  netbox-reports:
  netbox-scripts:
  postgres-data:
  redis-data: