From 29bbbeb9732ae92e2746868f45edcbea2d93b07b Mon Sep 17 00:00:00 2001 From: fabiobxl Date: Tue, 10 Feb 2026 13:49:34 +0000 Subject: [PATCH] Upload files to "/" --- README.md | 174 +++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 27 +++++++ 2 files changed, 201 insertions(+) create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/README.md b/README.md new file mode 100644 index 0000000..aafa92a --- /dev/null +++ b/README.md @@ -0,0 +1,174 @@ +# EU Media Guide CMS + +CMS basato su Grav per la gestione dei contenuti multilingua della media guide. + +## Struttura del Progetto + +``` +grav-cms-mediaguide/ +├── docker-compose.yml # Config Docker per Coolify +├── config/ +│ ├── system.yaml # Config sistema (24 lingue EU) +│ └── site.yaml # Config sito +├── blueprints/ +│ └── station.yaml # Blueprint per le stazioni/moduli +├── pages/ +│ └── stations/ +│ └── test-module/ # Modulo di test +├── plugins/ +│ └── json-export/ # Plugin per export JSON + API +└── README.md +``` + +## Deploy su Coolify + +### 1. Crea Repository Git + +```bash +cd grav-cms-mediaguide +git init +git add . +git commit -m "Initial CMS setup" +git remote add origin +git push -u origin main +``` + +### 2. Deploy su Coolify + +1. In Coolify, crea un nuovo servizio **Docker Compose** +2. Collega il repository Git +3. Imposta la porta pubblica su `8080` +4. Deploy! + +### 3. Setup Iniziale Grav + +Dopo il primo deploy, accedi al container e crea l'utente admin: + +```bash +# Accedi al container +docker exec -it mediaguide-cms bash + +# Crea utente admin +bin/plugin login new-user +``` + +### 4. Installa Plugin Admin + +```bash +bin/gpm install admin +``` + +## API Endpoints + +Il plugin `json-export` espone questi endpoint: + +| Endpoint | Descrizione | +|----------|-------------| +| `GET /api/stations?lang=en` | Lista tutte le stazioni | +| `GET /api/station/{id}?lang=en` | Contenuto singola stazione | +| `GET /api/translations?lang=en` | Traduzioni UI | +| `GET /api/export` | Esporta tutto in file JSON | + +### Esempio Risposta `/api/station/test-welcome?lang=en` + +```json +{ + "id": "test-welcome", + "type": "intro", + "language": "en", + "title": "Welcome to the European Parliament", + "description": "Your interactive guide to European democracy", + "components": [ + { + "id": "welcome-heading", + "type": "heading", + "level": "h1", + "content": "Welcome to the European Parliament" + }, + { + "id": "intro-text", + "type": "text", + "content": "

Welcome to the heart of European democracy...

" + }, + { + "id": "welcome-video", + "type": "video", + "src": "/media/videos/welcome-en.mp4", + "poster": "/media/images/video-poster.jpg", + "caption": "A brief introduction to the European Parliament" + } + ] +} +``` + +## Lingue Supportate (Ordine Protocollo UE) + +| Codice | Lingua | +|--------|--------| +| bg | български | +| es | español | +| cs | čeština | +| da | dansk | +| de | Deutsch | +| et | eesti | +| el | ελληνικά | +| en | English | +| fr | français | +| ga | Gaeilge | +| hr | hrvatski | +| it | italiano | +| lv | latviešu | +| lt | lietuvių | +| hu | magyar | +| mt | Malti | +| nl | Nederlands | +| pl | polski | +| pt | português | +| ro | română | +| sk | slovenčina | +| sl | slovenščina | +| fi | suomi | +| sv | svenska | + +## Gestione Contenuti + +### Creare una Nuova Stazione + +1. Accedi all'admin panel: `http://your-domain:8080/admin` +2. Vai su **Pages** → **Add** → **Station** +3. Compila i campi multilingua +4. Aggiungi i componenti (heading, text, video, audio, tabs, slideshow) +5. Salva + +### Struttura File Markdown + +Ogni stazione è un file `.md` con frontmatter YAML: + +```yaml +--- +title: Station Title +station_id: unique-id +station_type: exhibit +active: true +order: 1 + +title_translations: + en: English Title + fr: Titre français + +components: + - type: heading + id: heading-1 + level: h1 + content: + en: English Heading + fr: Titre français +--- +``` + +## Prossimi Passi + +1. [ ] Deploy del CMS su Coolify +2. [ ] Configurare l'admin panel +3. [ ] Creare il container React per l'app +4. [ ] Collegare l'app agli endpoint API del CMS diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..53dcb41 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +version: '3.8' + +services: + grav-cms: + image: getgrav/grav:latest + container_name: mediaguide-cms + restart: unless-stopped + ports: + - "8080:80" + volumes: + # Persistent storage for all Grav user content + - grav_user:/var/www/html/user + # Custom blueprints (mounted from host) + - ./blueprints:/var/www/html/user/blueprints + # Custom plugins config + - ./config:/var/www/html/user/config + environment: + - GRAV_MULTISITE=false + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/"] + interval: 30s + timeout: 10s + retries: 3 + +volumes: + grav_user: + driver: local