mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-19 12:05:16 +00:00
Compare commits
3 Commits
michelroeg
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45d991f215 | ||
|
|
586b4c57a4 | ||
|
|
2bb1b0ff36 |
67
ct/domain-locker.sh
Normal file
67
ct/domain-locker.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: CrazyWolf13
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Lissy93/domain-locker
|
||||
|
||||
APP="Domain-Locker"
|
||||
var_tags="${var_tags:-Monitoring}"
|
||||
var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-10240}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/domain-locker ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "domain-locker" "Lissy93/domain-locker"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop domain-locker
|
||||
msg_info "Service stopped"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
setup_nodejs
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker"
|
||||
|
||||
msg_info "Installing Modules (patience)"
|
||||
cd /opt/domain-locker
|
||||
$STD npm install
|
||||
msg_ok "Installed Modules"
|
||||
|
||||
msg_info "Building Domain-Locker (a lot of patience)"
|
||||
set -a
|
||||
source /opt/domain-locker.env
|
||||
set +a
|
||||
$STD npm run build
|
||||
msg_info "Built Domain-Locker"
|
||||
|
||||
msg_info "Restarting Services"
|
||||
systemctl start domain-locker
|
||||
msg_ok "Restarted Services"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
6
ct/headers/domain-locker
Normal file
6
ct/headers/domain-locker
Normal file
@@ -0,0 +1,6 @@
|
||||
____ _ __ __
|
||||
/ __ \____ ____ ___ ____ _(_)___ / / ____ _____/ /_____ _____
|
||||
/ / / / __ \/ __ `__ \/ __ `/ / __ \______/ / / __ \/ ___/ //_/ _ \/ ___/
|
||||
/ /_/ / /_/ / / / / / / /_/ / / / / /_____/ /___/ /_/ / /__/ ,< / __/ /
|
||||
/_____/\____/_/ /_/ /_/\__,_/_/_/ /_/ /_____/\____/\___/_/|_|\___/_/
|
||||
|
||||
44
frontend/public/json/domain-locker.json
Normal file
44
frontend/public/json/domain-locker.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "Domain Locker",
|
||||
"slug": "domain-locker",
|
||||
"categories": [
|
||||
9
|
||||
],
|
||||
"date_created": "2025-11-10",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://domain-locker.com/about",
|
||||
"config_path": "/opt/domain-locker.env",
|
||||
"website": "https://github.com/Lissy93/domain-locker",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/domain-locker.webp",
|
||||
"description": "The all-in-one tool, for keeping track of your domain name portfolio. Got domain names? Get Domain Locker! ",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/domain-locker.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 4096,
|
||||
"hdd": 8,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Show DB credentials: `cat ~/Domain-Locker.creds`",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Domain-locker takes quite some time to build and a lot of ressources, RAM and Cores can be lowered after install.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
72
install/domain-locker-install.sh
Normal file
72
install/domain-locker-install.sh
Normal file
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: CrazyWolf13
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/CrazyWolf13/domain-locker
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="domainlocker_db" PG_DB_USER="domainlocker" setup_postgresql_db
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker"
|
||||
|
||||
msg_info "Installing Modules (patience)"
|
||||
cd /opt/domain-locker
|
||||
$STD npm install
|
||||
msg_ok "Installed Modules"
|
||||
|
||||
msg_info "Building Domain-Locker (a lot of patience)"
|
||||
cat <<EOF >/opt/domain-locker.env
|
||||
# Database connection
|
||||
DL_PG_HOST=localhost
|
||||
DL_PG_PORT=5432
|
||||
DL_PG_USER=$PG_DB_USER
|
||||
DL_PG_PASSWORD=$PG_DB_PASS
|
||||
DL_PG_NAME=$PG_DB_NAME
|
||||
|
||||
# Build + Runtime
|
||||
DL_ENV_TYPE=selfHosted
|
||||
NITRO_PRESET=node_server
|
||||
NODE_ENV=production
|
||||
EOF
|
||||
set -a
|
||||
source /opt/domain-locker.env
|
||||
set +a
|
||||
$STD npm run build
|
||||
msg_info "Built Domain-Locker"
|
||||
|
||||
msg_info "Building Database schema"
|
||||
export PGPASSWORD="$DL_PG_PASSWORD"
|
||||
$STD psql -h "$DL_PG_HOST" -p "$DL_PG_PORT" -U "$DL_PG_USER" -d "$DL_PG_NAME" -f "/opt/domain-locker/db/schema.sql"
|
||||
msg_ok "Built Database schema"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/domain-locker.service
|
||||
[Unit]
|
||||
Description=Domain-Locker Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/opt/domain-locker.env
|
||||
WorkingDirectory=/opt/domain-locker
|
||||
ExecStart=/opt/domain-locker/start.sh
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl start --now -q domain-locker
|
||||
msg_info "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user