feat: scaffold Strapi 5 CMS with PostgreSQL and i18n config
Add Strapi 5 headless CMS application at apps/cms/ with: - PostgreSQL database configuration (afterlife database) - i18n plugin enabled with Spanish (default) and English locales - TypeScript configuration - Standard Strapi middleware stack - Environment variable template (.env.example) - Admin panel locale support for es/en Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
13
apps/cms/config/admin.ts
Normal file
13
apps/cms/config/admin.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export default ({ env }) => ({
|
||||
auth: {
|
||||
secret: env("ADMIN_JWT_SECRET"),
|
||||
},
|
||||
apiToken: {
|
||||
salt: env("API_TOKEN_SALT"),
|
||||
},
|
||||
transfer: {
|
||||
token: {
|
||||
salt: env("TRANSFER_TOKEN_SALT"),
|
||||
},
|
||||
},
|
||||
});
|
||||
13
apps/cms/config/database.ts
Normal file
13
apps/cms/config/database.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export default ({ env }) => ({
|
||||
connection: {
|
||||
client: "postgres",
|
||||
connection: {
|
||||
host: env("DATABASE_HOST", "127.0.0.1"),
|
||||
port: env.int("DATABASE_PORT", 5432),
|
||||
database: env("DATABASE_NAME", "afterlife"),
|
||||
user: env("DATABASE_USERNAME", "afterlife"),
|
||||
password: env("DATABASE_PASSWORD", "afterlife"),
|
||||
ssl: env.bool("DATABASE_SSL", false),
|
||||
},
|
||||
},
|
||||
});
|
||||
12
apps/cms/config/middlewares.ts
Normal file
12
apps/cms/config/middlewares.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export default [
|
||||
"strapi::logger",
|
||||
"strapi::errors",
|
||||
"strapi::security",
|
||||
"strapi::cors",
|
||||
"strapi::poweredBy",
|
||||
"strapi::query",
|
||||
"strapi::body",
|
||||
"strapi::session",
|
||||
"strapi::favicon",
|
||||
"strapi::public",
|
||||
];
|
||||
9
apps/cms/config/plugins.ts
Normal file
9
apps/cms/config/plugins.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export default () => ({
|
||||
i18n: {
|
||||
enabled: true,
|
||||
config: {
|
||||
defaultLocale: "es",
|
||||
locales: ["es", "en"],
|
||||
},
|
||||
},
|
||||
});
|
||||
7
apps/cms/config/server.ts
Normal file
7
apps/cms/config/server.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export default ({ env }) => ({
|
||||
host: env("HOST", "0.0.0.0"),
|
||||
port: env.int("PORT", 1337),
|
||||
app: {
|
||||
keys: env.array("APP_KEYS"),
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user