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-dev
): Based on nexent/nexent image with development tools - Service containers:
- Elasticsearch (
nexent-elasticsearch
) - PostgreSQL (
nexent-postgresql
) - MinIO (
nexent-minio
) - Nexent backend (
nexent
) - Nexent 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
andanysphere.remote-sshRemote
) - 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
docker/deploy.sh
script ininfrastructure
mode to start containers - Enter
nexent-minio
andnexent-elasticsearch
containers, copyMINIO_ACCESS_KEY
,MINIO_SECRET_KEY
,ELASTICSEARCH_API_KEY
environment variables to corresponding positions indocker/docker-compose.dev.yml
- Press
F1
orCtrl+Shift+P
, typeDev Containers: Reopen in Container ...
- Cursor will start the development container based on configuration in
.devcontainer
directory
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 commit
orgit push
; however, pulling remote code in container is not recommended as it may cause path issues
3. Port Mapping
The following ports are mapped in devcontainer.json:
- 3000: Nexent Web interface
- 5010: Nexent backend service
- 5012: Data processing service
- 9010: MinIO API
- 9011: MinIO console
- 9210: Elasticsearch API
- 5434: PostgreSQL
4. Customizing Development Environment
You can customize the development environment by modifying:
.devcontainer/devcontainer.json
- Plugin configurationdocker/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) /opt
If container startup fails, try:
- Rebuild container: Press
F1
orCtrl+Shift+P
, typeDev Containers: Rebuild Container
- Check Docker logs:
docker logs nexent-dev
- Check if configuration in
.env
file is correct