diff --git a/bin/g3n.ts b/bin/g3n.ts index 73cc3fd..6cf4794 100755 --- a/bin/g3n.ts +++ b/bin/g3n.ts @@ -188,8 +188,10 @@ function handleCompose(name?: string): void { return; } - if(args.port.length !== 2) { - console.error("❌ Compose port must be 2 digits"); + const _port = args.port.toString().padStart(2, "0"); + + if(_port.length !== 2) { + console.error(`❌ Compose port must be 2 digits [00-99] , ${args.port}`); return; } diff --git a/bin/src/compose.ts b/bin/src/compose.ts index 579d4ef..a007dad 100644 --- a/bin/src/compose.ts +++ b/bin/src/compose.ts @@ -86,7 +86,7 @@ echo "Generating directory..." mkdir -p data data/app data/postgres data/frpc data/ssh echo "Generating authorized_keys..." -cat << EOF > data/ssh/authorized_keys +cat > data/ssh/authorized_keys <