Skip to content

Commit 7d2dccd

Browse files
chore: Cursor Cloud rules
1 parent db2cc40 commit 7d2dccd

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.cursor/rules/10-cursor-cloud.mdc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
description: "Rules for handling this project in a Cursor Cloud environment."
3+
alwaysApply: false
4+
---
5+
6+
7+
## Cursor Cloud specific instructions
8+
9+
### Architecture
10+
11+
SiteBuilder is a Symfony 7.4 / PHP 8.4 web app with a TypeScript/Stimulus frontend. It runs inside Docker containers (app, mariadb, nginx, messenger). See `docs/archbook.md` for vertical architecture details and `docs/frontendbook.md` for frontend conventions.
12+
13+
### Running the dev environment
14+
15+
All commands go through `mise run` (see `.cursor/rules/07-workflow.mdc` for the full task list). Key commands:
16+
17+
- `mise run setup` — idempotent full bootstrap (builds containers, installs deps, migrates DB, builds frontend, runs quality + tests)
18+
- `mise run quality` — lint/format checks (required before commit)
19+
- `mise run tests` — PHP tests (architecture, unit, integration, application)
20+
- `mise run tests:frontend` — Vitest frontend tests
21+
- `mise run frontend` — build frontend assets (Tailwind + TypeScript via SWC)
22+
23+
### Docker-in-Docker (Cloud VM specific)
24+
25+
The Cloud VM is itself a container inside a Firecracker VM. Docker must be installed with `fuse-overlayfs` storage driver and `iptables-legacy`. After installing Docker, run `sudo chmod 666 /var/run/docker.sock` so commands work without `sudo`. The update script handles starting `dockerd` if it's not already running.
26+
27+
### Composer private repositories
28+
29+
The `composer.json` references private GitHub VCS repos (`dx-tooling/etfs-*`). Composer needs a GitHub token: pass it via `COMPOSER_AUTH` env var or run `composer config --global github-oauth.github.com "$(gh auth token)"` inside the app container before `composer install`. The update script handles this automatically.
30+
31+
### Nginx port
32+
33+
The nginx container binds to a random host port (`127.0.0.1::80`). Find the assigned port with `docker compose ps` and look at the nginx PORTS column.
34+
35+
### `.env.local`
36+
37+
Must contain `HOST_PROJECT_PATH="/workspace"`. The setup script creates this if missing. This value is used by the messenger service for Docker-in-Docker volume mounts (not critical for basic dev).

0 commit comments

Comments
 (0)