Răsfoiți Sursa

Update Tilt configuration for development (#3556)

Signed-off-by: Manas Sivakumar <manas23601@gmail.com>
Manas Sivakumar 3 luni în urmă
părinte
comite
e0cf026caf
2 a modificat fișierele cu 13 adăugiri și 8 ștergeri
  1. 5 0
      README.md
  2. 8 8
      Tiltfile.opencost

+ 5 - 0
README.md

@@ -72,10 +72,15 @@ The OpenCost MCP (Model Context Protocol) server provides AI agents with access
 #### Using Tilt (Development)
 ```bash
 # Clone and start OpenCost with MCP server
+# You may also need to clone opencost-ui and opencost-helm-charts repositories
+# Make sure the cloned repositories are in the same parent tree as opencost
+
 git clone https://github.com/opencost/opencost.git
 cd opencost
 tilt up
 ```
+##### Default Configurations
+The UI and Prometheus both run on port 9090. You may need to port-forward to a non-default port to access both them at the same time.
 
 Tilt configuration notes (cloud costs):
 

+ 8 - 8
Tiltfile.opencost

@@ -66,10 +66,10 @@ def run_opencost(options):
     # npm install if package.json changes
     local_resource(
         name='build-npm-install',
-        dir='../opencost/ui',
+        dir='../opencost-ui',
         cmd='npm install',
         deps=[
-            '../opencost/ui/package.json',
+            '../opencost-ui/package.json',
         ],
         allow_parallel=True,
     )
@@ -77,11 +77,11 @@ def run_opencost(options):
     # Build FE locally when code changes
     local_resource(
         name='build-ui',
-        dir='../opencost/ui',
+        dir='../opencost-ui',
         cmd='npx parcel build src/index.html',
         deps=[
-            '../opencost/ui/src',
-            '../opencost/ui/package.json',
+            '../opencost-ui/src',
+            '../opencost-ui/package.json',
         ],
         allow_parallel=True,
         resource_deps=['build-npm-install'],
@@ -90,8 +90,8 @@ def run_opencost(options):
     # update container when relevant files change
     docker_build(
         ref=options["docker_repo"]+'opencost-ui',
-        context='../opencost/ui',
-        dockerfile='../opencost/ui/Dockerfile.debug',
+        context='../opencost-ui',
+        dockerfile='../opencost-ui/Dockerfile.debug',
         only=[
             'dist',
             'nginx.conf',
@@ -99,7 +99,7 @@ def run_opencost(options):
             'docker-entrypoint.sh',
         ],
         live_update=[
-            sync('../opencost/ui/dist', '/var/www'),
+            sync('../opencost-ui/dist', '/var/www'),
         ],
     )