Skip to content

Commit ee2f5ef

Browse files
push-app-to-main[bot]michelroegl-brunnerMickLesk
authored
Domain-Locker (#9214)
* 'Add new script' * Remove duplicate npm install command Removed redundant npm install command before building. * Rename PostgreSQL database to 'domainlocker_db' --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Michel Roegl-Brunner <[email protected]> Co-authored-by: CanbiZ <[email protected]>
1 parent 9fc45c1 commit ee2f5ef

File tree

4 files changed

+189
-0
lines changed

4 files changed

+189
-0
lines changed

ct/domain-locker.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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: CrazyWolf13
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Lissy93/domain-locker
7+
8+
APP="Domain-Locker"
9+
var_tags="${var_tags:-Monitoring}"
10+
var_cpu="${var_cpu:-4}"
11+
var_ram="${var_ram:-10240}"
12+
var_disk="${var_disk:-8}"
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 /opt/domain-locker ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
if check_for_gh_release "domain-locker" "Lissy93/domain-locker"; then
32+
msg_info "Stopping Service"
33+
systemctl stop domain-locker
34+
msg_info "Service stopped"
35+
36+
PG_VERSION="17" setup_postgresql
37+
setup_nodejs
38+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker"
39+
40+
msg_info "Installing Modules (patience)"
41+
cd /opt/domain-locker
42+
$STD npm install
43+
msg_ok "Installed Modules"
44+
45+
msg_info "Building Domain-Locker (a lot of patience)"
46+
set -a
47+
source /opt/domain-locker.env
48+
set +a
49+
$STD npm run build
50+
msg_info "Built Domain-Locker"
51+
52+
msg_info "Restarting Services"
53+
systemctl start domain-locker
54+
msg_ok "Restarted Services"
55+
msg_ok "Updated successfully!"
56+
fi
57+
exit
58+
}
59+
60+
start
61+
build_container
62+
description
63+
64+
msg_ok "Completed Successfully!\n"
65+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
66+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
67+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

ct/headers/domain-locker

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
____ _ __ __
2+
/ __ \____ ____ ___ ____ _(_)___ / / ____ _____/ /_____ _____
3+
/ / / / __ \/ __ `__ \/ __ `/ / __ \______/ / / __ \/ ___/ //_/ _ \/ ___/
4+
/ /_/ / /_/ / / / / / / /_/ / / / / /_____/ /___/ /_/ / /__/ ,< / __/ /
5+
/_____/\____/_/ /_/ /_/\__,_/_/_/ /_/ /_____/\____/\___/_/|_|\___/_/
6+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "Domain Locker",
3+
"slug": "domain-locker",
4+
"categories": [
5+
9
6+
],
7+
"date_created": "2025-11-10",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 3000,
12+
"documentation": "https://domain-locker.com/about",
13+
"config_path": "/opt/domain-locker.env",
14+
"website": "https://github.com/Lissy93/domain-locker",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/domain-locker.webp",
16+
"description": "The all-in-one tool, for keeping track of your domain name portfolio. Got domain names? Get Domain Locker! ",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/domain-locker.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 4096,
24+
"hdd": 8,
25+
"os": "Debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": [
35+
{
36+
"text": "Show DB credentials: `cat ~/Domain-Locker.creds`",
37+
"type": "info"
38+
},
39+
{
40+
"text": "Domain-locker takes quite some time to build and a lot of ressources, RAM and Cores can be lowered after install.",
41+
"type": "info"
42+
}
43+
]
44+
}

install/domain-locker-install.sh

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: CrazyWolf13
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/CrazyWolf13/domain-locker
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+
PG_VERSION="17" setup_postgresql
17+
PG_DB_NAME="domainlocker_db" PG_DB_USER="domainlocker" setup_postgresql_db
18+
NODE_VERSION="22" setup_nodejs
19+
20+
fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker"
21+
22+
msg_info "Installing Modules (patience)"
23+
cd /opt/domain-locker
24+
$STD npm install
25+
msg_ok "Installed Modules"
26+
27+
msg_info "Building Domain-Locker (a lot of patience)"
28+
cat <<EOF >/opt/domain-locker.env
29+
# Database connection
30+
DL_PG_HOST=localhost
31+
DL_PG_PORT=5432
32+
DL_PG_USER=$PG_DB_USER
33+
DL_PG_PASSWORD=$PG_DB_PASS
34+
DL_PG_NAME=$PG_DB_NAME
35+
36+
# Build + Runtime
37+
DL_ENV_TYPE=selfHosted
38+
NITRO_PRESET=node_server
39+
NODE_ENV=production
40+
EOF
41+
set -a
42+
source /opt/domain-locker.env
43+
set +a
44+
$STD npm run build
45+
msg_info "Built Domain-Locker"
46+
47+
msg_info "Building Database schema"
48+
export PGPASSWORD="$DL_PG_PASSWORD"
49+
$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"
50+
msg_ok "Built Database schema"
51+
52+
msg_info "Creating Service"
53+
cat <<EOF >/etc/systemd/system/domain-locker.service
54+
[Unit]
55+
Description=Domain-Locker Service
56+
After=network.target
57+
58+
[Service]
59+
EnvironmentFile=/opt/domain-locker.env
60+
WorkingDirectory=/opt/domain-locker
61+
ExecStart=/opt/domain-locker/start.sh
62+
Restart=always
63+
64+
[Install]
65+
WantedBy=multi-user.target
66+
EOF
67+
systemctl start --now -q domain-locker
68+
msg_info "Created Service"
69+
70+
motd_ssh
71+
customize
72+
cleanup_lxc

0 commit comments

Comments
 (0)