Nexent Dev Container Usage Guide
1. Environment Overview
This development container configuration sets up a complete Nexent development environment, including the following components:
- Main development container (
nexent-data-process): Based on the nexent/nexent-data-process image, with the repository code mounted into the container's/optdirectory and a Python development environment pre-installed - Service containers (infrastructure and application services deployed via
bash deploy.sh docker):- Elasticsearch (
nexent-elasticsearch) - PostgreSQL (
nexent-postgresql) - MinIO (
nexent-minio) - Backend Config service (
nexent-config) - Web frontend (
nexent-web) - Data processing service (
nexent-data-process)
- Elasticsearch (
2. Usage Steps
2.1 Prerequisites
- Install Cursor/VS Code
- Install Dev Containers extension (
anysphere.remote-containers) - Ensure Docker and Docker Compose are installed and running
2.2 Starting Project with Dev Container
- Clone the project locally
- Open project folder in Cursor/VS Code
- Run
bash deploy.sh docker --components infrastructure,application,data-process,supabase --port-policy developmentfrom the repository root to start base containers - The deploy script writes generated variables such as
MINIO_ACCESS_KEY,MINIO_SECRET_KEY, andELASTICSEARCH_API_KEYback todeploy/env/.env. Services indeploy/docker/compose/docker-compose.dev.ymlload these settings automatically viaenv_file, so no manual copying is needed - Press
F1orCtrl+Shift+P, typeDev Containers: Reopen in Container ... - Cursor will start the development container based on configuration in
.devcontainerdirectory
2.3 Development Workflow
- After container starts, Cursor automatically connects to development container
- All file editing is done within the container
- Develop, test, and build directly in container after modifications
- Git change management can be done directly in container using
git commitorgit push; however, pulling remote code in container is not recommended as it may cause path issues
3. Port Mapping
The following ports are forwarded via forwardPorts in .devcontainer/devcontainer.json:
- 3000: Nexent Web interface
- 5012: Data processing service
Other service ports (Backend Config service 5010, PostgreSQL 5434, MinIO API 9010, MinIO console 9011, Elasticsearch API 9210, etc.) are published directly on the host by Docker Compose under the development port policy and can be accessed directly from the host machine.
4. Customizing Development Environment
You can customize the development environment by modifying:
.devcontainer/devcontainer.json- Plugin configurationdeploy/docker/compose/docker-compose.dev.yml- Development container build configuration, requires environment variable modification for proper startup
5. Troubleshooting
If you encounter permission issues, you may need to run in container:
bash
sudo chown -R $(id -u):$(id -g) /optIf container startup fails, try:
- Rebuild container: Press
F1orCtrl+Shift+P, typeDev Containers: Rebuild Container - Check Docker logs:
docker logs nexent-data-process - Check if configuration in
.envfile is correct
