Skip to content

Commit 301ea36

Browse files
authored
InvenTree (#2890)
1 parent fc26bad commit 301ea36

File tree

3 files changed

+130
-0
lines changed

3 files changed

+130
-0
lines changed

ct/inventree.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/inventree/InvenTree
7+
8+
APP="InvenTree"
9+
var_tags="inventory"
10+
var_cpu="2"
11+
var_ram="2048"
12+
var_disk="6"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d "/opt/inventree" ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
msg_info "Updating $APP"
32+
$STD apt-get update
33+
$STD apt-get install --only-upgrade inventree -y
34+
msg_ok "Updated $APP"
35+
exit
36+
}
37+
38+
start
39+
build_container
40+
description
41+
42+
msg_ok "Completed Successfully!\n"
43+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
44+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
45+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

install/inventree-install.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/inventree/InvenTree
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt-get install -y \
18+
curl \
19+
sudo \
20+
mc \
21+
gnupg \
22+
sudo
23+
temp_file=$(mktemp)
24+
wget -q http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb -O $temp_file
25+
$STD dpkg -i $temp_file
26+
msg_ok "Installed Dependencies"
27+
28+
msg_info "Setting up InvenTree Repository"
29+
mkdir -p /etc/apt/keyrings
30+
curl -fsSL https://dl.packager.io/srv/inventree/InvenTree/key | gpg --dearmor -o /etc/apt/keyrings/inventree.gpg
31+
echo "deb [signed-by=/etc/apt/keyrings/inventree.gpg] https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04 main" >/etc/apt/sources.list.d/inventree.list
32+
msg_ok "Set up InvenTree Repository"
33+
34+
msg_info "Setup ${APPLICATION} (Patience)"
35+
$STD apt-get update
36+
$STD apt-get install -y inventree
37+
msg_ok "Setup ${APPLICATION}"
38+
39+
motd_ssh
40+
customize
41+
42+
msg_info "Cleaning up"
43+
rm -f $temp_file
44+
$STD apt-get -y autoremove
45+
$STD apt-get -y autoclean
46+
msg_ok "Cleaned"

json/inventree.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "InvenTree",
3+
"slug": "inventree",
4+
"categories": [
5+
25
6+
],
7+
"date_created": "2025-03-05",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 80,
12+
"documentation": "https://docs.inventree.org/en/latest/",
13+
"website": "https://inventree.org",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/inventree.svg",
15+
"description": "InvenTree is an open-source inventory management system which provides intuitive parts management and stock control. It is designed to be lightweight and easy to use for SME or hobbyist applications.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/inventree.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 2048,
23+
"hdd": 6,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": "admin",
31+
"password": "`cat /etc/inventree/admin_password.txt`"
32+
},
33+
"notes": [
34+
{
35+
"text": "Please read the documentation for your configuration needs.",
36+
"type": "info"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)