Skip to content

Commit 3491f86

Browse files
committed
Add oneliner
1 parent f8fa587 commit 3491f86

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

install-oneliner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ chmod +x install.sh
124124
./install.sh "$CONFIG_MODE"
125125

126126
# Move to user's home directory
127-
INSTALL_DIR="$HOME/needle"
127+
INSTALL_DIR="$HOME/.needle"
128128
if [ -d "$INSTALL_DIR" ]; then
129129
print_warning "Directory $INSTALL_DIR already exists. Removing old installation..."
130130
rm -rf "$INSTALL_DIR"

needlectl-binary

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python3
2+
3+
import os
4+
import sys
5+
from pathlib import Path
6+
7+
# Add the needlectl directory to Python path
8+
needlectl_dir = Path(__file__).parent / "needlectl"
9+
sys.path.insert(0, str(needlectl_dir))
10+
11+
from cli.main import app
12+
13+
if __name__ == "__main__":
14+
app()

needlectl/build.sh

100644100755
File mode changed.

needlectl/cli/service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ def start_services(self):
130130
# Start backend
131131
typer.echo("Starting Needle backend...")
132132
backend_dir = self.needle_home / "backend"
133+
uvicorn_path = backend_dir / "venv" / "bin" / "uvicorn"
133134
command = [
134-
"bash", "-c",
135-
f"cd {backend_dir} && source venv/bin/activate && uvicorn main:app --host 0.0.0.0 --port 8000 --reload"
135+
str(uvicorn_path), "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"
136136
]
137137
log_file = self.needle_home / "logs" / "backend.log"
138138
self._start_virtual_env_service("Backend", command, self.backend_pid_file, log_file)

needlectl/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ def get_config_file(filename) -> Path:
2626

2727

2828
def get_compose_file():
29-
compose_path = Path(os.path.join(get_storage_dir(), "docker-compose.yaml"))
29+
compose_path = Path(os.path.join(get_storage_dir(), "docker", "docker-compose.infrastructure.yaml"))
3030
return Path(compose_path)

0 commit comments

Comments
 (0)