Project

General

Profile

Update Netbox » History » Version 3

Ahmed Bilal, 05/08/2020 09:08 AM

1 1 Ahmed Bilal
h1. Update Netbox
2
3
4
@/etc/supervisor.d/netbox.ini@
5
6
<pre>
7
[program:netbox]
8
command = /home/app/netbox/venv/bin/gunicorn -c /home/app/netbox/gunicorn_config.py netbox.wsgi
9
directory = /home/app/netbox/netbox/
10
user = app
11
12
[program:netbox-rqworker]
13
command = /home/app/netbox/venv/bin/python3 /home/app/netbox/netbox/manage.py rqworker
14
directory = /home/app/netbox/netbox/
15
user = app
16
</pre>
17
18
19
REDIS configuration in @/home/app/netbox/netbox/netbox/configuration.py@ should be like below
20
21
<pre>
22 3 Ahmed Bilal
<code class="python">
23 1 Ahmed Bilal
REDIS = {
24
    'tasks': {
25
        'HOST': 'localhost',
26
        'PORT': 6379,
27
        'PASSWORD': '',
28
        'DATABASE': 0,
29
        'DEFAULT_TIMEOUT': 300,
30
        'SSL': False,
31
    },
32
    'caching': {
33
        'HOST': 'localhost',
34
        'PORT': 6379,
35
        'PASSWORD': '',
36
        'DATABASE': 1,
37
        'DEFAULT_TIMEOUT': 300,
38
        'SSL': False,
39
    }
40
}
41 3 Ahmed Bilal
</code>
42 1 Ahmed Bilal
</pre>
43
44
<pre><code class="shell">
45
cd /home/app/netbox
46 2 Ahmed Bilal
47 1 Ahmed Bilal
git checkout master
48
git reset --hard
49
git pull origin master
50 2 Ahmed Bilal
51 1 Ahmed Bilal
chown -R app:app .
52 2 Ahmed Bilal
53 1 Ahmed Bilal
echo django-auth-ldap >> requirements.txt
54
echo python-decouple >> requirements.txt
55 2 Ahmed Bilal
56 1 Ahmed Bilal
./upgrade.sh
57 2 Ahmed Bilal
58 1 Ahmed Bilal
supervisorctl reread
59
supervisorctl reload
60
supervisorctl restart all
61
</code></pre>