Skip to content

Hot reload controlplane local setup#128

Merged
AbirAbbas merged 1 commit intomainfrom
abir/hot-reload-cp
Jan 5, 2026
Merged

Hot reload controlplane local setup#128
AbirAbbas merged 1 commit intomainfrom
abir/hot-reload-cp

Conversation

@AbirAbbas
Copy link
Contributor

@AbirAbbas AbirAbbas commented Jan 5, 2026

Summary

Adds Docker-based local development environment with hot-reload for the control plane. When you modify Go files, the server automatically rebuilds and restarts.

What's included

File Purpose
control-plane/dev.sh Simple script to start/stop dev environment
control-plane/docker-compose.dev.yml Docker Compose with SQLite (default) and PostgreSQL modes
control-plane/Dockerfile.dev Dev container with Go toolchain and Air
control-plane/.air.toml Air configuration for hot-reload
control-plane/README.md Documentation for local Docker development
.gitignore Added tmp/ for Air build artifacts

Usage

cd control-plane
./dev.sh            # SQLite mode (default, no dependencies)
./dev.sh postgres   # PostgreSQL mode
./dev.sh down       # Stop containers
./dev.sh clean      # Stop and remove volumes

The server runs at http://localhost:8080 and automatically reloads when .go, .yaml, or .yml files change.

Technical details

  • Uses Air v1.61.7 for hot-reload (compatible with Go 1.24)
  • Go build cache and module cache persisted in Docker volumes for faster rebuilds
  • Web UI not included in dev mode (run npm run dev separately if needed)

Testing

  • Verified Docker build succeeds
  • Verified hot-reload triggers on file changes
  • ./scripts/test-all.sh

Checklist

  • I updated documentation where applicable.
  • I added or updated tests (or none were needed).
  • I updated CHANGELOG.md (or this change does not warrant a changelog entry).

@AbirAbbas AbirAbbas merged commit 690d481 into main Jan 5, 2026
17 checks passed
@AbirAbbas AbirAbbas deleted the abir/hot-reload-cp branch January 5, 2026 14:53
@santoshkumarradha
Copy link
Member

love-you-gif-by-sky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants