chore(dev): add SELinux-specific mise tasks (#290)

This commit is contained in:
AlexMa233
2026-03-28 01:11:26 +08:00
committed by GitHub
parent 7f9d6e4aba
commit dbe6471d4b
3 changed files with 58 additions and 0 deletions
+10
View File
@@ -40,9 +40,14 @@ Default host ports are shifted away from the production compose stack: Web `1808
```bash
mise run dev # Start all services
mise run dev:selinux # Start all services on SELinux hosts
mise run dev:down # Stop all services
mise run dev:down:selinux # Stop SELinux dev environment
mise run dev:logs # View logs
mise run dev:logs:selinux # View logs on SELinux hosts
mise run dev:restart -- server # Restart a specific service
mise run dev:restart:selinux -- server # Restart a service on SELinux hosts
mise run bridge:build:selinux # Rebuild bridge binary on SELinux hosts
```
## More Commands
@@ -50,9 +55,14 @@ mise run dev:restart -- server # Restart a specific service
| Command | Description |
| ------- | ----------- |
| `mise run dev` | Start containerized dev environment |
| `mise run dev:selinux` | Start dev environment with SELinux compose overrides |
| `mise run dev:down` | Stop dev environment |
| `mise run dev:down:selinux` | Stop SELinux dev environment |
| `mise run dev:logs` | View dev logs |
| `mise run dev:logs:selinux` | View dev logs on SELinux hosts |
| `mise run dev:restart` | Restart a service (e.g. `-- server`) |
| `mise run dev:restart:selinux` | Restart a service on SELinux hosts |
| `mise run bridge:build:selinux` | Rebuild bridge binary in SELinux dev container |
| `mise run setup` | Install deps and prepare local tooling |
| `mise run db-up` | Run database migrations |
| `mise run db-down` | Roll back database migrations |
+16
View File
@@ -0,0 +1,16 @@
services:
deps:
security_opt:
- label=disable
migrate:
security_opt:
- label=disable
server:
security_opt:
- label=disable
web:
security_opt:
- label=disable
+32
View File
@@ -1,6 +1,9 @@
[monorepo]
config_roots = ["apps/web", "apps/desktop", "apps/browser", "packages/ui", "packages/sdk", "packages/config"]
[monorepo]
config_roots = ["apps/web", "cmd/agent"]
[tools]
# Go version from go.mod
go = "1.25.6"
@@ -67,18 +70,38 @@ set -e
docker compose -f devenv/docker-compose.yml up --build
"""
[tasks."dev:selinux"]
description = "Start development environment on SELinux systems"
run = """
#!/bin/bash
set -e
docker compose -f devenv/docker-compose.yml -f devenv/docker-compose.selinux.yml up --build
"""
[tasks."dev:down"]
description = "Stop development environment"
run = "docker compose -f devenv/docker-compose.yml down --remove-orphans"
[tasks."dev:down:selinux"]
description = "Stop development environment on SELinux systems"
run = "docker compose -f devenv/docker-compose.yml -f devenv/docker-compose.selinux.yml down --remove-orphans"
[tasks."dev:logs"]
description = "View development logs"
run = "docker compose -f devenv/docker-compose.yml logs -f"
[tasks."dev:logs:selinux"]
description = "View development logs on SELinux systems"
run = "docker compose -f devenv/docker-compose.yml -f devenv/docker-compose.selinux.yml logs -f"
[tasks."dev:restart"]
description = "Restart a service (usage: mise run dev:restart -- server)"
run = "docker compose -f devenv/docker-compose.yml restart $@"
[tasks."dev:restart:selinux"]
description = "Restart a service on SELinux systems (usage: mise run dev:restart:selinux -- server)"
run = "docker compose -f devenv/docker-compose.yml -f devenv/docker-compose.selinux.yml restart $@"
[tasks."bridge:build"]
description = "Manually rebuild bridge binary in dev container (normally auto-triggered by air)"
run = """
@@ -88,6 +111,15 @@ docker compose -f devenv/docker-compose.yml exec server \
sh -c 'cd /workspace && sh devenv/bridge-build.sh'
"""
[tasks."bridge:build:selinux"]
description = "Manually rebuild bridge binary in SELinux dev container"
run = """
#!/bin/bash
set -e
docker compose -f devenv/docker-compose.yml -f devenv/docker-compose.selinux.yml exec server \
sh -c 'cd /workspace && sh devenv/bridge-build.sh'
"""
[tasks.db-up]
description = "Initialize and Migrate Database"
run = "scripts/db-up.sh"