feat: add Docker support with Dockerfile and docker-compose.yml, update asset upload to use backend URL

This commit is contained in:
Frank John Begornia
2025-11-20 02:07:03 +08:00
parent fce7a0ec72
commit af24186d63
4 changed files with 128 additions and 4 deletions

View File

@@ -77,9 +77,9 @@ const uploadDesignAsset = async (
throw new Error("Asset uploads can only run in the browser context.");
}
const storageUrl = config.public.storageUrl;
if (!storageUrl) {
throw new Error("Storage URL is not configured.");
const backendUrl = config.public.backendUrl;
if (!backendUrl) {
throw new Error("Backend URL is not configured.");
}
const formData = new FormData();
@@ -92,7 +92,7 @@ const uploadDesignAsset = async (
}
return await $fetch<StorageUploadResponse>("/storage/upload", {
baseURL: storageUrl,
baseURL: backendUrl,
method: "POST",
headers: {
"content-type": "multipart/form-data",