Skip to content

Commit ea756dc

Browse files
push-app-to-main[bot]tremor021MickLesk
authored
infisical (#8926)
* 'Add new script' * Update infisical.sh * Update Infisical installation script with dynamic keys * Remove cleanup commands from install script Removed cleanup commands from the Infisical installation script. * Refactor Infisical repository setup process * Update date_created to 2025-11-07 --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Slaviša Arežina <[email protected]> Co-authored-by: CanbiZ <[email protected]>
1 parent 96fb535 commit ea756dc

File tree

4 files changed

+169
-0
lines changed

4 files changed

+169
-0
lines changed

ct/headers/infisical

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
____ _____ _ __
2+
/ _/___ / __(_)____(_)________ _/ /
3+
/ // __ \/ /_/ / ___/ / ___/ __ `/ /
4+
_/ // / / / __/ (__ ) / /__/ /_/ / /
5+
/___/_/ /_/_/ /_/____/_/\___/\__,_/_/
6+

ct/infisical.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL 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://infisical.com/
7+
8+
APP="Infisical"
9+
var_tags="${var_tags:-auth}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-2048}"
12+
var_disk="${var_disk:-6}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${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+
if [[ ! -d /etc/infisical ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
msg_info "Stopping service"
32+
$STD infisical-ctl stop
33+
msg_ok "Service stopped"
34+
35+
msg_info "Creating backup"
36+
DB_PASS=$(grep -Po '(?<=^Database Password:\s).*' ~/infisical.creds | head -n1)
37+
PGPASSWORD=$DB_PASS pg_dump -U infisical -h localhost -d infisical_db > /opt/infisical_backup.sql
38+
msg_ok "Created backup"
39+
40+
msg_info "Updating Infisical"
41+
$STD apt update
42+
$STD apt install -y infisical-core
43+
$STD infisical-ctl reconfigure
44+
msg_ok "Updated Infisical"
45+
46+
msg_info "Starting service"
47+
infisical-ctl start
48+
msg_ok "Started service"
49+
msg_ok "Updated successfully"
50+
exit
51+
}
52+
53+
start
54+
build_container
55+
description
56+
57+
msg_ok "Completed Successfully!\n"
58+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
59+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
60+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Infisical",
3+
"slug": "infisical",
4+
"categories": [
5+
6
6+
],
7+
"date_created": "2025-11-07",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8080,
12+
"documentation": "https://infisical.com/docs/documentation/getting-started/overview",
13+
"config_path": "/etc/infisical/infisical.rb",
14+
"website": "https://infisical.com/",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/infisical.webp",
16+
"description": "Secrets, certificates, and access management on autopilot. All-in-one platform to securely manage application secrets, certificates, SSH keys, and configurations across your team and infrastructure.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/infisical.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 2048,
24+
"hdd": 6,
25+
"os": "Debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

install/infisical-install.sh

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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://infisical.com/
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 install -y \
18+
apt-transport-https \
19+
ca-certificates \
20+
redis
21+
msg_ok "Installed Dependencies"
22+
23+
PG_VERSION="17" setup_postgresql
24+
25+
msg_info "Setting up Infisical Repository"
26+
setup_deb822_repo \
27+
"infisical" \
28+
"https://artifacts-infisical-core.infisical.com/infisical.gpg" \
29+
"https://artifacts-infisical-core.infisical.com/deb" \
30+
"stable"
31+
msg_ok "Setup Infisical repository"
32+
33+
msg_info "Configuring PostgreSQL"
34+
DB_NAME="infisical_db"
35+
DB_USER="infisical"
36+
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
37+
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
38+
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
39+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
40+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
41+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
42+
{
43+
echo "Infiscal Credentials"
44+
echo "Database Name: $DB_NAME"
45+
echo "Database User: $DB_USER"
46+
echo "Database Password: $DB_PASS"
47+
} >>~/infisical.creds
48+
msg_ok "Configured PostgreSQL"
49+
50+
msg_info "Setting up Infisical"
51+
AUTH_SECRET="$(openssl rand -base64 32 | tr -d '\n')"
52+
ENC_KEY="$(openssl rand -hex 16 | tr -d '\n')"
53+
IP_ADDR=$(hostname -I | awk '{print $1}')
54+
$STD apt install -y infisical-core
55+
mkdir -p /etc/infisical
56+
cat <<EOF >/etc/infisical/infisical.rb
57+
infisical_core['ENCRYPTION_KEY'] = '$ENC_KEY'
58+
infisical_core['AUTH_SECRET'] = '$AUTH_SECRET'
59+
infisical_core['HOST'] = '$IP_ADDR'
60+
infisical_core['DB_CONNECTION_URI'] = 'postgres://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}'
61+
infisical_core['REDIS_URL'] = 'redis://localhost:6379'
62+
EOF
63+
$STD infisical-ctl reconfigure
64+
msg_ok "Setup Infisical"
65+
66+
motd_ssh
67+
customize
68+
cleanup_lxc

0 commit comments

Comments
 (0)