generated from k01ek/netbox-plugin-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (40 loc) · 1.47 KB
/
Makefile
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
PYTHON_VER?=3.7
NETBOX_VER?=v2.10.3
COMPOSE_FILE=./develop/docker-compose.yml
BUILD_NAME=netbox_newplugin
VERFILE=./netbox_newplugin/version.py
cbuild:
docker-compose -f ${COMPOSE_FILE} \
-p ${BUILD_NAME} build \
--build-arg netbox_ver=${NETBOX_VER} \
--build-arg python_ver=${PYTHON_VER}
debug:
@echo "Starting Netbox .. "
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} up
start:
@echo "Starting Netbox in detached mode.. "
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} up -d
stop:
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} down
destroy:
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} down
docker volume rm -f ${BUILD_NAME}_pgdata_netbox_newplugin
nbshell:
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} run netbox python manage.py nbshell
shell:
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} run netbox python manage.py shell
adduser:
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} run netbox python manage.py createsuperuser
collectstatic:
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} run netbox python manage.py collectstatic
migrations:
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} up -d postgres
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} \
run netbox python manage.py makemigrations ${BUILD_NAME}
docker-compose -f ${COMPOSE_FILE} -p ${BUILD_NAME} down
pbuild:
python3 -m pip install --upgrade build
python3 -m build
pypipub:
python3 -m pip install --user --upgrade twine
python3 -m twine upload dist/*