Overview
This template provides a production‑ready Strapi instance as a Monk runnable. You can:- Run it directly to get a managed headless CMS with customizable content types
- Inherit it in your own applications to add a flexible, developer-friendly CMS
What this template manages
- Strapi server with admin UI
- PostgreSQL or MySQL database
- Media library and file uploads
- REST and GraphQL APIs
- Content type builder
- Web UI on port 1337
Quick start (run directly)
- Load templates
- Run Strapi with defaults
- Customize credentials (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesinstrapi/strapi.yaml, thenmonk load MANIFESTand run.
http://localhost:1337/admin and create your admin user on first launch.
Configuration
Key variables you can customize in this template:${monk-volume-path}/strapi and ${monk-volume-path}/postgres on the host.
Use by inheritance (recommended for apps)
Inherit the Strapi runnable in your application and declare a connection. Example:Ports and connectivity
- Service:
strapion TCP port1337 - Admin:
http://\<host>:1337/admin - REST API:
http://\<host>:1337/api/\<content-type> - GraphQL:
http://\<host>:1337/graphql(plugin) - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the Strapi host.
Persistence and configuration
- Uploads:
${monk-volume-path}/strapi/public:/opt/app/public - App data:
${monk-volume-path}/strapi/.strapi:/opt/app/.strapi - Database:
${monk-volume-path}/postgres:/var/lib/postgresql/data
Features
- Content Type Builder: Visual editor for data models
- Media Library: Upload, manage, and optimize assets
- REST & GraphQL: Auto-generated APIs from content types
- Role-Based Access: Granular permissions for users and API tokens
- Plugins: Extend functionality (i18n, email, upload providers)
- Webhooks: Trigger external services on content changes
- Draft & Publish: Content versioning workflow
- Customizable Admin: Extend with React components
- Multi-Database: PostgreSQL, MySQL, SQLite, MariaDB
API Access
REST API example:Content Types
Create content types in the admin:- Go to Content-Type Builder
- Create new collection type (e.g., “Article”)
- Add fields (title, content, image, etc.)
- Save and auto-restart
- API endpoints are automatically generated
Use cases
Strapi excels at:- Headless CMS for websites and mobile apps
- E-commerce backends
- Blog and publishing platforms
- Multi-channel content delivery
- Rapid prototyping and MVPs
- Internal admin dashboards
- API-first applications
Related templates
- Combine with PostgreSQL or MySQL templates for content storage
- Use with CDN templates for static asset delivery
- Integrate with object storage (S3, MinIO) for media files
Troubleshooting
- Access Strapi admin at
http://localhost:1337/adminon first launch to create your admin user. - Generate secrets:
- For first-time setup, ensure
app-keyshas 4 comma-separated keys (e.g.,"key1,key2,key3,key4"). - Create API tokens in the Strapi admin: Settings → API Tokens.
- Check logs:
- If database connection fails, verify PostgreSQL is running and credentials are correct.
- For file upload issues, ensure volume permissions allow the container to write.
- For API errors, verify authentication tokens and content type permissions in the admin.