Skip to main content

Strapi

Strapi is an open-source, Node.js based, headless CMS (Content Management System). It gives developers the freedom to use their favorite tools and frameworks while allowing editors to easily manage and distribute their content. Strapi can be fully customized to adapt to projects' needs and integrated with any third-party services.

Strapi versions

The template now support the following versions of Strapi: >=4.9

May works with other versions, but not tested.

Strapi installation

To use this template, you need to install Strapi first. You can do it by following the official documentation

With NPM (npx)

dcmd toolbox start # in your project root folder
npx create-strapi-app@latest my_strapi_project --typescript --quickstart

Get the template

At root of your project (where the package.json folder is located), run the following command:

dcmd template get strapi

Configure the template

  • Create and configure the environnement file by copying the .env.example file to .env
  • Set the name of your project in the docker-compose.yml file
  • Set the right name for your virtual host in .docker/etc/apache/httpd-vhosts.conf

More information here : project configuration

Initialize the project

At root of your project (where the package.json folder is located), run the following command:

dcmd up

Setup the environment

Setup Strapi environment files, and your settings for the right database credentials and other settings.

Note that a MariaDB database is already configured in the docker-compose.yml file, but Strapi uses SQLite by default. If you want to switch on it (recommended), you need to change the DATABASE_CLIENT variable in the Strapi .env file and set the other ones such as password, username etc.

Default database credentials

Informationdefault value
hostdb
port3306
namedefault
usernameuser
passworduser

Start the project

dcmd strapi
Website URL

You're good to go! You can now access your project at : http://${PROJECT_NAME}.dev.local Or : http://localhost:1337