Skip to content

Devika is the first open-source implementation of an Agentic Software Engineer. Initially started as an open-source alternative to Devin.

Python

override VITE_API_BASE_URL, fix volume issue

Peter Schütz7a6413398c3e
diff --git a/app.dockerfile b/app.dockerfile
index 46c8859..b257b91 100644
--- a/app.dockerfile
+++ b/app.dockerfile
@@ -1,5 +1,9 @@
FROM debian:12
+# setting up build variable
+ARG VITE_API_BASE_URL
+ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
+
# setting up os env
USER root
WORKDIR /home/nonroot/client
diff --git a/docker-compose.yaml b/docker-compose.yaml
index c0e271f..0ed741e 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -35,7 +35,7 @@ services:
retries: 5
start_period: 30s
volumes:
- - devika-backend-dbstore:/db
+ - devika-backend-dbstore:/home/nonroot/db
networks:
- devika-subnetwork
@@ -43,10 +43,10 @@ services:
build:
context: .
dockerfile: app.dockerfile
+ args:
+ - VITE_API_BASE_URL=http://127.0.0.1:1337
depends_on:
- devika-backend-engine
- environment:
- - VITE_API_BASE_URL="http://devika-backend-engine:1337"
expose:
- 3000
ports:
diff --git a/ui/src/lib/api.js b/ui/src/lib/api.js
index 1d09e9f..6a24775 100644
--- a/ui/src/lib/api.js
+++ b/ui/src/lib/api.js
@@ -6,7 +6,7 @@ import {
internet,
} from "./store";
-export const API_BASE_URL = "http://127.0.0.1:1337";
+export const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "http://127.0.0.1:1337";
export async function fetchProjectList() {
const response = await fetch(`${API_BASE_URL}/api/project-list`);