Aggiungo CMS Strapi self-hosted per gestire rosa, classifica e storico partite
Introduce lo stack Strapi dockerizzato (infra/strapi/), sullo stesso Postgres dello stack Supabase con un database logico separato, dietro Caddy su /cms/*. L'editing dei dati avviene solo nel pannello admin nativo di Strapi. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
const config = {
|
||||
locales: [
|
||||
// 'ar',
|
||||
// 'fr',
|
||||
// 'cs',
|
||||
// 'de',
|
||||
// 'da',
|
||||
// 'es',
|
||||
// 'he',
|
||||
// 'id',
|
||||
// 'it',
|
||||
// 'ja',
|
||||
// 'ko',
|
||||
// 'ms',
|
||||
// 'nl',
|
||||
// 'no',
|
||||
// 'pl',
|
||||
// 'pt-BR',
|
||||
// 'pt',
|
||||
// 'ru',
|
||||
// 'sk',
|
||||
// 'sv',
|
||||
// 'th',
|
||||
// 'tr',
|
||||
// 'uk',
|
||||
// 'vi',
|
||||
// 'zh-Hans',
|
||||
// 'zh',
|
||||
],
|
||||
};
|
||||
|
||||
const bootstrap = (app) => {
|
||||
console.log(app);
|
||||
};
|
||||
|
||||
export default {
|
||||
config,
|
||||
bootstrap,
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
const { mergeConfig } = require('vite');
|
||||
|
||||
module.exports = (config) => {
|
||||
// Important: always return the modified config
|
||||
return mergeConfig(config, {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': '/src',
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "giocatori",
|
||||
"info": {
|
||||
"singularName": "giocatore",
|
||||
"pluralName": "giocatoris",
|
||||
"displayName": "Giocatore",
|
||||
"description": "Anagrafica rosa CRAP Volley. Le statistiche (presenze, MVP, ecc.) restano calcolate lato app, non vivono qui."
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"codice": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"unique": true,
|
||||
"regex": "^g[0-9]+$"
|
||||
},
|
||||
"nome": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"numero": {
|
||||
"type": "integer",
|
||||
"required": true
|
||||
},
|
||||
"ruolo": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"nascita": {
|
||||
"type": "date",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::giocatore.giocatore');
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::giocatore.giocatore');
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::giocatore.giocatore');
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "match_storici",
|
||||
"info": {
|
||||
"singularName": "match-storico",
|
||||
"pluralName": "match-storicos",
|
||||
"displayName": "Match storico",
|
||||
"description": "Storico partite di campionato CSI."
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"data": {
|
||||
"type": "date",
|
||||
"required": true
|
||||
},
|
||||
"avversario": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"casa": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
"default": true
|
||||
},
|
||||
"set_nostri": {
|
||||
"type": "integer",
|
||||
"required": true
|
||||
},
|
||||
"set_loro": {
|
||||
"type": "integer",
|
||||
"required": true
|
||||
},
|
||||
"parziali": {
|
||||
"type": "json"
|
||||
},
|
||||
"mvp": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::match-storico.match-storico');
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::match-storico.match-storico');
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::match-storico.match-storico');
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "righe_classifica",
|
||||
"info": {
|
||||
"singularName": "riga-classifica",
|
||||
"pluralName": "riga-classificas",
|
||||
"displayName": "Riga classifica",
|
||||
"description": "Classifica campionato CSI, una riga per squadra."
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"pos": {
|
||||
"type": "integer",
|
||||
"required": true
|
||||
},
|
||||
"squadra": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"giocate": {
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"default": 0
|
||||
},
|
||||
"vinte": {
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"default": 0
|
||||
},
|
||||
"perse": {
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"default": 0
|
||||
},
|
||||
"set_fatti": {
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"default": 0
|
||||
},
|
||||
"set_subiti": {
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"default": 0
|
||||
},
|
||||
"punti": {
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"default": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::riga-classifica.riga-classifica');
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::riga-classifica.riga-classifica');
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::riga-classifica.riga-classifica');
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "scout_match_finales",
|
||||
"info": {
|
||||
"singularName": "scout-match-finale",
|
||||
"pluralName": "scout-match-finales",
|
||||
"displayName": "Scout match finale",
|
||||
"description": "Risultato finale di una partita scoutata dal vivo (dato storico, di sola consultazione). L'azione-per-azione resta in scout_live/localStorage durante la partita."
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"match_id": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"unique": true
|
||||
},
|
||||
"data": {
|
||||
"type": "date",
|
||||
"required": true
|
||||
},
|
||||
"avversario": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"casa": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
"default": true
|
||||
},
|
||||
"set_nostri": {
|
||||
"type": "integer",
|
||||
"required": true
|
||||
},
|
||||
"set_loro": {
|
||||
"type": "integer",
|
||||
"required": true
|
||||
},
|
||||
"parziali": {
|
||||
"type": "json"
|
||||
},
|
||||
"mvp": {
|
||||
"type": "string"
|
||||
},
|
||||
"azioni": {
|
||||
"type": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::scout-match-finale.scout-match-finale');
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::scout-match-finale.scout-match-finale');
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::scout-match-finale.scout-match-finale');
|
||||
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
register(/*{ strapi }*/) {},
|
||||
bootstrap(/*{ strapi }*/) {},
|
||||
};
|
||||
Reference in New Issue
Block a user