Strapi comes with a full featured Command Line Interface (CLI) which lets you scaffold and manage your project in seconds.
To start working with the Strapi CM template you have to
- Node V18
- NPM
- MySQL
- Docker
You can use this strapi template locally in two different ways for development:
- running locally with the
develop
,start
orbuild
commands list below - Using
docker-compose
to create
Create a .env
file taking into consideration the .env.example
structure.
In the terminal you can run the following command to avoid misspelling and data lost:
cp .env.example .env
Then, fill all the required variables before starting the server. Learn more about .env files
When using Docker, you only need to set the required variables in .env
file and then, run the following command:
docker-compose -f docker-compose.dev.yml up
Once you do this, two containers are gonna be created:
- cms-strapi-development
- mysql-strapi-development
🚧 Important: for the following options you need to create you own DB and set the different variables to connect to it (check the .env
file). A MySQL DB is required.
Start your Strapi application with autoReload enabled. Learn more
npm run develop
Start your Strapi application with autoReload disabled. Learn more
npm run start
Build your admin panel. Learn more
npm run build
This guide outlines the required steps to build and publish a new version of a Docker image to Docker Hub.
⚠️ Every release must include:
- A version tag (e.g.,
1.0.1
)- The
latest
tag pointing to that version
Note
- The
<version>
should be replace- The
<repo-name>
should be replace withcms-strapi
Replace <version>
with the version you are releasing:
docker build -f Dockerfile.prod . --build-arg TARGETPLATFORM=linux/amd64 -t bryanstgarcia/<repo-name>:<version>
This ensures that the latest tag always reflects the most recent version.
docker tag bryanstgarcia/<repo-name>:<version> bryanstgarcia/<repo-name>:latest
You can also use the image id to tag. Sometimes is easier.
docker login
Enter your Docker Hub credentials when prompted.
docker push bryanstgarcia/<repo-name>:<version>
docker push bryanstgarcia/<repo-name>:latest
Both tags must be pushed for the release to be considered complete.
Go to: https://hub.docker.com/r/bryanstgarcia/cms-strapi
Make sure both tags are listed:
<version>
and latest
- Resource center - Strapi resource center.
- Strapi documentation - Official Strapi documentation.
- Strapi tutorials - List of tutorials made by the core team and the community.
- Strapi blog - Official Strapi blog containing articles made by the Strapi team and the community.
- Changelog - Find out about the Strapi product updates, new features and general improvements.
Feel free to check out the Strapi GitHub repository. Your feedback and contributions are welcome!
- Discord - Come chat with the Strapi community including the core team.
- Forum - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
- Awesome Strapi - A curated list of awesome things related to Strapi.