This document explains how to run the JLib Inspector using Docker Compose.
- Docker
- Docker Compose
-
Start the services:
./start-docker.sh
Or manually:
docker-compose up --build
-
Access the application:
- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:8080
-
Stop the services:
docker-compose down
- Port: 8080
- Health Check: http://localhost:8080/health
- API Endpoints: http://localhost:8080/api/apps
- Port: 3000
- Built with: Node.js, Express, React
- Connects to: JLib Server at http://jlib-server:8080
- Base image: OpenJDK 21
- Builds Maven project
- Exposes port 8080
- Includes health check with curl
- Base image: Node.js 18 Alpine
- Builds React application with Webpack
- Serves via Express on port 3000
- Configured to connect to backend service
- Both services run on a custom bridge network (
jlib-network) - Frontend connects to backend using service name
jlib-server - Ports are bound to host: 3000 (frontend) and 8080 (backend)
JAVA_OPTS: JVM options (default:-Xms512m -Xmx1g)
PORT: Frontend server port (default: 3000)JLIB_SERVER_URL: Backend URL (default:http://jlib-server:8080)
View logs for specific services:
# Backend logs
docker-compose logs jlib-server
# Frontend logs
docker-compose logs jlib-frontend
# All logs
docker-compose logs- Check if port 8080 is already in use
- Verify Java 21 compatibility
- Check build logs:
docker-compose logs jlib-server
- Ensure backend is healthy:
curl http://localhost:8080/health - Check network connectivity between containers
- Verify environment variable
JLIB_SERVER_URL
- Clean and rebuild:
docker-compose down && docker-compose up --build --force-recreate - Check available disk space
- Verify all source files are present
For development with auto-reload:
# Build images once
docker-compose build
# Start with logs
docker-compose up
# In another terminal, make changes to source code
# Rebuild specific service:
docker-compose build jlib-frontend
docker-compose up -d jlib-frontend