-
Notifications
You must be signed in to change notification settings - Fork 18
Doc d9 #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc d9 #240
Changes from 17 commits
55db970
79abad7
e10e58e
b23560c
6823159
1f1635f
b488541
d6076a5
613ab72
5a9c944
034dcd4
6602312
7ad5a88
12e13c4
eec9fe8
e8df821
57b9b39
d65d3c0
c96ae5b
7dc962c
709db6b
1170830
47e376a
0588743
dd6f2f6
be149e4
d444dbd
13e23ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # d9 — Directus 9 Fork by La Webcapsule | ||
|
|
||
| ## Project | ||
|
|
||
| d9 is an open-source fork of Directus 9 (GPLv3), focused on performance and EU regulatory compliance. Maintained by La Webcapsule. | ||
|
|
||
| ## Skills & Contributing | ||
|
|
||
| ### Install the d9-skills plugin | ||
|
|
||
| All agent skills and the SkillOps contribution pipeline live in the **[d9-skills](https://github.com/LaWebcapsule/d9-skills)** plugin repo. | ||
|
|
||
| ```bash | ||
| # As a Claude Code plugin (recommended — includes skills + commands + hooks) | ||
| git clone https://github.com/LaWebcapsule/d9-skills.git | ||
| claude --plugin-dir ./d9-skills | ||
|
|
||
| # Skills only (any agent) | ||
| npx skills add LaWebcapsule/d9-skills | ||
| ``` | ||
|
|
||
| ### Contributing a skill | ||
|
|
||
| Every debugging session is a potential contribution. Run `/d9-skills:skillops` to share your experience. The pipeline detects the pattern, anonymizes your session, formats a SKILL.md, and opens a PR — all from a single command. | ||
|
|
||
| ## Important rules | ||
|
|
||
| - Code identifiers `@directus/`, `directus_*`, `DIRECTUS_*`, `npx directus`, `new Directus()` must NEVER be renamed | ||
| - Plugins must be rebuilt (`pnpm build` in plugins/) before any deployment | ||
| - AWS region is eu-west-3 (Paris) for all services | ||
| - Contact: support@webcapsule.io |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| # d9 — Docker Setup | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ```bash | ||
| # 1. Clone the repo | ||
| git clone https://github.com/LaWebcapsule/directus9.git | ||
| cd directus9 | ||
|
|
||
| # 2. Copy and edit environment variables | ||
| cp .env.docker .env | ||
| # Edit .env — at minimum change DIRECTUS_SECRET to a random string | ||
|
|
||
| # 3. Launch everything | ||
| docker compose -f docker-compose.prod.yml up -d | ||
|
|
||
| # 4. Open d9 | ||
| # http://localhost:8055 | ||
| # Login: admin@example.com / d9-admin-password (or whatever you set in .env) | ||
|
|
||
| # 5. (Optional) Apply the invoicing schema | ||
| docker compose -f docker-compose.prod.yml exec d9 node /directus/cli.js schema apply --yes /directus/snapshots/invoicing-schema.yaml | ||
| ``` | ||
|
|
||
| ## Architecture | ||
|
|
||
| | Service | Image | Port | Purpose | | ||
| |------------|--------------------| -----|-----------------------| | ||
| | **d9** | Built from source | 8055 | API + Admin dashboard | | ||
| | **postgres** | postgres:16-alpine | 5432 (internal) | Database | | ||
| | **redis** | redis:7-alpine | 6379 (internal) | Cache store | | ||
|
|
||
| ## Volumes | ||
|
|
||
| - `d9-db` — PostgreSQL data (persistent) | ||
| - `d9-redis` — Redis data | ||
| - `d9-uploads` — User-uploaded files | ||
| - `d9-extensions` — Custom extensions | ||
|
|
||
| ## Invoicing Schema (Factur-X) | ||
|
|
||
| The `snapshots/invoicing-schema.yaml` file contains a complete data model for electronic invoicing: | ||
|
|
||
| | Collection | Description | | ||
| |------------|-------------| | ||
| | `company` | Issuing company info (singleton) — SIRET, TVA intra, legal mentions | | ||
| | `clients` | Client companies/individuals | | ||
| | `products` | Product/service catalog with VAT rates | | ||
| | `invoices` | Invoices with lifecycle (draft → validated → sent → paid) | | ||
| | `invoice_items` | Invoice line items with quantity, price, VAT | | ||
| | `payments` | Payment tracking linked to invoices | | ||
|
|
||
| Factur-X fields included: SIRET, SIREN, TVA intracommunautaire, sequential numbering, ISO currency, payment terms. | ||
|
|
||
| Apply it after first boot: | ||
| ```bash | ||
| docker compose -f docker-compose.prod.yml exec d9 node /directus/cli.js schema apply --yes /directus/snapshots/invoicing-schema.yaml | ||
| ``` | ||
|
|
||
| ## Custom Extensions | ||
|
|
||
| Place built extensions in the `extensions/` directory before building, or mount them via the `d9-extensions` volume after startup. | ||
|
|
||
| If you have source plugins in `plugins/`, rebuild them first: | ||
|
|
||
| ```bash | ||
| cd plugins/<your-plugin> | ||
| pnpm build | ||
| # Copy dist output to extensions/ | ||
| ``` | ||
|
|
||
| ## Useful Commands | ||
|
|
||
| ```bash | ||
| # View logs | ||
| docker compose -f docker-compose.prod.yml logs -f d9 | ||
|
|
||
| # Restart after config change | ||
| docker compose -f docker-compose.prod.yml restart d9 | ||
|
|
||
| # Rebuild after code change | ||
| docker compose -f docker-compose.prod.yml up -d --build d9 | ||
|
|
||
| # Stop everything | ||
| docker compose -f docker-compose.prod.yml down | ||
|
|
||
| # Stop and delete all data | ||
| docker compose -f docker-compose.prod.yml down -v | ||
| ``` | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| See `.env.docker` for all configurable variables. Key ones: | ||
|
|
||
| | Variable | Default | Description | | ||
| |----------|---------|-------------| | ||
| | `DIRECTUS_SECRET` | `change-me...` | JWT signing secret (MUST change) | | ||
| | `ADMIN_EMAIL` | `admin@example.com` | Initial admin email | | ||
| | `ADMIN_PASSWORD` | `d9-admin-password` | Initial admin password | | ||
| | `DB_PASSWORD` | `d9` | PostgreSQL password | | ||
| | `PUBLIC_URL` | `http://localhost:8055` | Public-facing URL | | ||
| | `LOG_LEVEL` | `info` | Logging verbosity | | ||
|
|
||
| > **Note**: Code-level identifiers (`DIRECTUS_*` env vars, `@directus/` imports, `directus_*` DB tables) are part of the Directus engine and must NOT be renamed. d9 is a fork — the internal engine references remain unchanged. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pas trop fan des modifs introduites - notamment d'utiliser postgres au lieu de psql par défaut.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, similaire à ce que j'ai dit plus tôt. Je ferai une autre PR pour ca. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pareil, pas la bonne PR pour ajouter ce fichier