Add support for local deployment target in Pokedex deployment scripts

This commit is contained in:
2026-01-30 04:57:41 +00:00
parent aa8b05d6bf
commit b82e2f2424
2 changed files with 24 additions and 10 deletions

View File

@@ -41,6 +41,9 @@ const SSH_HOSTS = {
port: 2323,
username: 'GregRJacobs',
privateKeyPath: '~/.ssh/ds3627xs_gregrjacobs'
},
local: {
host: 'localhost'
}
};
@@ -81,7 +84,7 @@ function parseArgs() {
// Validate target
if (!SSH_HOSTS[config.target]) {
throw new Error(
`Invalid target: ${config.target}. Must be 'internal' or 'external'.`
`Invalid target: ${config.target}. Must be 'internal', 'external', or 'local'.`
);
}
@@ -207,12 +210,17 @@ async function deploy() {
try {
// Parse arguments
const config = parseArgs();
const isLocal = config.target === 'local';
const sshConfig = SSH_HOSTS[config.target];
console.log('🚀 Starting Pokedex.Online deployment');
console.log(
`📡 Target: ${config.target} (${sshConfig.host}:${sshConfig.port})`
);
if (isLocal) {
console.log(`📡 Target: local`);
} else {
console.log(
`📡 Target: ${config.target} (${sshConfig.host}:${sshConfig.port})`
);
}
console.log(`🔌 Frontend Port: ${config.port}`);
if (config.sslPort) {
console.log(`🔒 HTTPS Port: ${config.sslPort}`);
@@ -220,7 +228,9 @@ async function deploy() {
console.log(`🔌 Backend Port: ${config.backendPort}`);
// Connect to Synology using ~/.ssh/config
console.log('\n🔐 Connecting to Synology...');
if (!isLocal) {
console.log('\n🔐 Connecting to Synology...');
const keyPath = expandTilde(sshConfig.privateKeyPath);
console.log(` 🔑 Using SSH key: ${keyPath}`);
console.log(