Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions cms-i18n/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Directus Specific
directus/data/
directus/uploads/
directus/extensions/.registry

# Dependencies
node_modules/

# General Logs
logs/
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*

# Environment Variables
.env
.env.*
!.env.example
!.env.test
# Note: .env.*.local (from Next.js) is covered by .env.*

# Build Output (General)
# Framework specific build outputs (like .next/, .nuxt/, dist/, .output/, .svelte-kit/, build/) should be in their respective framework .gitignore files.

# Deployment Platforms
.netlify/
.vercel/
.wrangler/

# Testing Output
coverage/

# Cache / Temporary
.eslintcache
.stylelintcache

# Certificates
certificates/

# Operating System Files
.DS_Store
Thumbs.db

# IDE / Editor Configs
.idea
.vscode
3 changes: 3 additions & 0 deletions cms-i18n/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CMS - i18n

TODO: Readme here
48 changes: 48 additions & 0 deletions cms-i18n/directus/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Database Configuration
DB_USER=directus
DB_PASSWORD=directus
DB_DATABASE=directus

# Directus Configuration
DIRECTUS_PORT=8055
DIRECTUS_SECRET=6116487b-cda1-52c2-b5b5-c8022c45e263

# Cache Configuration
CACHE_ENABLED=true
CACHE_AUTO_PURGE=true

# Admin Configuration
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=d1r3ctu5

# WebSocket Configuration
WEBSOCKETS_ENABLED=true

# URL Configuration
PUBLIC_URL=http://localhost:8055

# CORS Configuration:
# Development: It's ok to use "*" or "http://localhost:3000" for local testing
# Production: Specify exact origins like:
# - Single origin: "https://your-domain.com"
# - Multiple origins: "https://app.domain.com,https://admin.domain.com"
# Warning: Using "*" in production is a security risk - always specify allowed origins
CORS_ENABLED=true
CORS_ORIGIN=*

# Cookie Configuration
REFRESH_TOKEN_COOKIE_SECURE=false
REFRESH_TOKEN_COOKIE_SAME_SITE=lax
REFRESH_TOKEN_COOKIE_DOMAIN=localhost

SESSION_COOKIE_SECURE=false
SESSION_COOKIE_SAME_SITE=lax
SESSION_COOKIE_DOMAIN=localhost

# Extensions Configuration
EXTENSIONS_PATH=./extensions
EXTENSIONS_AUTO_RELOAD=true
EXTENSIONS_ROLLDOWN=true

# Content Security Policy
CONTENT_SECURITY_POLICY_DIRECTIVES__FRAME_SRC=http://localhost:3000,http://localhost:4321,http://localhost:5173,https://*.youtube.com,https://*.vimeo.com,https://*.wistia.net,https://*.loom.com
86 changes: 86 additions & 0 deletions cms-i18n/directus/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: directus-cms-i18n-starter
services:
database:
image: postgis/postgis:16-master
platform: linux/amd64
volumes:
- ./data/database:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
healthcheck:
test: ["CMD", "pg_isready", "-U", "${DB_USER}", "-d", "${DB_DATABASE}", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
start_interval: 5s
start_period: 30s

cache:
image: redis:6
healthcheck:
test: ["CMD-SHELL", "[ $$(redis-cli ping) = 'PONG' ]"]
interval: 10s
timeout: 5s
retries: 5
start_interval: 5s
start_period: 30s

directus:
image: directus/directus:11.12.0
ports:
- ${DIRECTUS_PORT}:8055
volumes:
- ./uploads:/directus/uploads
- ./extensions:/directus/extensions
depends_on:
database:
condition: service_healthy
cache:
condition: service_healthy
environment:
SECRET: ${DIRECTUS_SECRET}

DB_CLIENT: "pg"
DB_HOST: "database"
DB_PORT: "5432"
DB_DATABASE: ${DB_DATABASE}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}

CACHE_ENABLED: ${CACHE_ENABLED}
CACHE_AUTO_PURGE: ${CACHE_AUTO_PURGE}
CACHE_STORE: "redis"
REDIS: "redis://cache:6379"

ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}

WEBSOCKETS_ENABLED: ${WEBSOCKETS_ENABLED}

PUBLIC_URL: ${PUBLIC_URL}

CORS_ENABLED: ${CORS_ENABLED}
CORS_ORIGIN: ${CORS_ORIGIN}

REFRESH_TOKEN_COOKIE_SECURE: ${REFRESH_TOKEN_COOKIE_SECURE}
REFRESH_TOKEN_COOKIE_SAME_SITE: ${REFRESH_TOKEN_COOKIE_SAME_SITE}
REFRESH_TOKEN_DOMAIN: ${REFRESH_TOKEN_COOKIE_DOMAIN}

SESSION_COOKIE_SECURE: ${SESSION_COOKIE_SECURE}
SESSION_COOKIE_SAME_SITE: ${SESSION_COOKIE_SAME_SITE}
SESSION_COOKIE_DOMAIN: ${SESSION_COOKIE_DOMAIN}

EXTENSIONS_PATH: ${EXTENSIONS_PATH}
EXTENSIONS_AUTO_RELOAD: ${EXTENSIONS_AUTO_RELOAD}
EXTENSIONS_ROLLDOWN: ${EXTENSIONS_ROLLDOWN}

CONTENT_SECURITY_POLICY_DIRECTIVES__FRAME_SRC: ${CONTENT_SECURITY_POLICY_DIRECTIVES__FRAME_SRC}

EMAIL_TRANSPORT: ${EMAIL_TRANSPORT}
EMAIL_FROM: ${EMAIL_FROM}
EMAIL_SMTP_HOST: ${EMAIL_SMTP_HOST}
EMAIL_SMTP_PORT: ${EMAIL_SMTP_PORT}
EMAIL_SMTP_USER: ${EMAIL_SMTP_USER}
EMAIL_SMTP_PASSWORD: ${EMAIL_SMTP_PASSWORD}
10 changes: 10 additions & 0 deletions cms-i18n/directus/template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CMS - i18n Template

This is a template for [Directus](https://directus.io/) - an open-source headless CMS and API. Use the template-cli to load / apply this template to a blank instance.

## Why

## What

## License

11 changes: 11 additions & 0 deletions cms-i18n/directus/template/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"author": "",
"description": "",
"directusTemplate": true,
"files": [
"src"
],
"name": "directus-template-cms-i18n",
"templateName": "CMS - i18n",
"version": "1.0.0"
}
72 changes: 72 additions & 0 deletions cms-i18n/directus/template/src/access.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[
{
"id": "1d247b0e-b4e0-4c2e-8ab5-cb00b82089eb",
"role": null,
"user": null,
"policy": "abf8a154-5b1c-4a46-ac9c-7300570f4f17",
"sort": 1
},
{
"id": "6de77eee-b06c-4665-97a9-2e54467483f9",
"role": "2c59431c-8412-4ff4-9374-3b8917de690c",
"user": null,
"policy": "ef049c8b-546b-4bbc-9cd7-b05d77e58b66",
"sort": 1
},
{
"id": "17fce6a0-06cb-4bdf-b0c7-cc789f131d17",
"role": "4516009c-8a04-49e4-b4ac-fd4883da6064",
"user": null,
"policy": "8ba4ed6f-d330-4675-ae46-119c533a0928",
"sort": 1
},
{
"id": "60941652-9d10-45c0-aefa-be5e65ce54a0",
"role": "d70780bd-f3ed-418b-98c2-f5354fd3fa68",
"user": null,
"policy": "8ba4ed6f-d330-4675-ae46-119c533a0928",
"sort": 1
},
{
"id": "17616f4c-8b7f-4084-a34f-4089d5bcfba2",
"role": "3a4464fb-2189-4710-a164-2503eed88ae7",
"user": null,
"policy": "a15b697e-29d5-4164-8d24-eb228ba901e3",
"sort": 1
},
{
"id": "9fbb829a-7cbd-4132-b22c-9a3bc89be671",
"role": "3a4464fb-2189-4710-a164-2503eed88ae7",
"user": null,
"policy": "abf8a154-5b1c-4a46-ac9c-7300570f4f17",
"sort": 2
},
{
"id": "0d7b1ae1-d7e3-4479-b716-8ac4aad8288a",
"role": "4516009c-8a04-49e4-b4ac-fd4883da6064",
"user": null,
"policy": "52598a64-071d-4071-96fa-4b620d6189b5",
"sort": 3
},
{
"id": "eadeac2d-6517-4a7b-a270-4a05f1136f82",
"role": "d70780bd-f3ed-418b-98c2-f5354fd3fa68",
"user": null,
"policy": "52598a64-071d-4071-96fa-4b620d6189b5",
"sort": 3
},
{
"id": "4de285fa-4a1a-4f65-b424-bdc8f02f7800",
"role": "3a4464fb-2189-4710-a164-2503eed88ae7",
"user": null,
"policy": "52598a64-071d-4071-96fa-4b620d6189b5",
"sort": 3
},
{
"id": "48f41f10-bdc6-405b-abc8-4da15df42043",
"role": "2c59431c-8412-4ff4-9374-3b8917de690c",
"user": null,
"policy": "ea6ff38d-214f-44df-aca6-138c91cd31c6",
"sort": null
}
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading