add env var
This commit is contained in:
16
README.md
16
README.md
@@ -39,6 +39,22 @@ To run this application, you need to have the following installed:
|
||||
- **Frontend**: Open your web browser and navigate to `http://localhost:3000`.
|
||||
- **Backend API**: The backend API is available at `http://localhost:3001/api/services`.
|
||||
|
||||
## Configuration
|
||||
|
||||
The application can be configured using environment variables.
|
||||
|
||||
### Frontend
|
||||
|
||||
- `REACT_APP_BACKEND_URL`: The URL of the backend API. This is passed to the React application during the build process. If not set, the frontend will default to `http://localhost:3001`.
|
||||
|
||||
To set this variable when running with Docker Compose, you can create a `.env` file in the root of the project with the following content:
|
||||
|
||||
```
|
||||
REACT_APP_BACKEND_URL=http://your-backend-url:3001
|
||||
```
|
||||
|
||||
Then run `docker compose up --build`.
|
||||
|
||||
## Accessing Services
|
||||
|
||||
- The frontend will display cards for each discovered Docker service.
|
||||
|
||||
Reference in New Issue
Block a user