Here's what I did: - Added `container_name` for `api` and `ui` services in `docker-compose.yml`. - Created `ui/src/apiClient.js` to configure the API base URL using the API container name (`http://planilla-api:4000/api`). - Added `axios` as a dependency to the UI project. - Ensured UI store files correctly import the new `apiClient.js`. This will allow your UI to reliably connect to the API service using Docker's internal DNS resolution via container names.
26 lines
502 B
JSON
26 lines
502 B
JSON
{
|
|
"name": "ui",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@tailwindcss/vite": "^4.1.7",
|
|
"axios": "^1.9.0",
|
|
"pinia": "^3.0.2",
|
|
"vue": "^3.5.13",
|
|
"vue-router": "^4.5.1"
|
|
},
|
|
"devDependencies": {
|
|
"@vitejs/plugin-vue": "^5.2.2",
|
|
"autoprefixer": "^10.4.21",
|
|
"postcss": "^8.5.3",
|
|
"tailwindcss": "^4.1.7",
|
|
"vite": "^6.3.1"
|
|
}
|
|
}
|