mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
refactor: remove generating keypair
This commit is contained in:
1 parent
740cbcecb4
commit
307af61726
3 files changed
-56
No files matched your search
@@ -2,7 +2,6 @@ import validator from 'validator'
|
||||
import { config as dotenvConfig } from 'dotenv'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
import { loadOrCreateKeyPair } from './utils/crypto.js'
|
||||
import { get } from './utils/env.js'
|
||||
|
||||
// Import dotenv and load ../.env
|
||||
@@ -38,11 +37,6 @@ function createConfig() {
|
||||
const backendUrl = get('BACKEND_URL', `http://host.docker.internal:${port}`)
|
||||
const url = new URL(baseUrl)
|
||||
const projectRoot = getProjectRoot()
|
||||
const keypairPath = get(
|
||||
'KEYPAIR_PATH',
|
||||
path.join(projectRoot, 'config', 'ssh_key')
|
||||
)
|
||||
const keypair = loadOrCreateKeyPair(keypairPath)
|
||||
|
||||
return {
|
||||
host,
|
||||
@@ -85,8 +79,6 @@ function createConfig() {
|
||||
mountQuest: !isProduction && process.env.MOUNT_QUEST === 'true',
|
||||
mountCLI: !isProduction && process.env.MOUNT_CLI === 'true',
|
||||
hostProjectRoot: get('HOST_PROJECT_ROOT', projectRoot),
|
||||
keypairPath,
|
||||
keypair,
|
||||
},
|
||||
|
||||
log: {
|
||||
|
||||
Reference in new issue
Block a user