From cbc41d6c8fcdb06c2a746fb0e17f1cb4e618511c Mon Sep 17 00:00:00 2001 From: Derrick Mehaffy Date: Tue, 9 Nov 2021 15:38:04 -0700 Subject: [PATCH 1/4] Minor fixes --- .../latest/getting-started/introduction.md | 8 +++----- .../latest/setup-deployment-guides/file-structure.md | 4 +++- .../installation/digitalocean-one-click.md | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/developer-docs/latest/getting-started/introduction.md b/docs/developer-docs/latest/getting-started/introduction.md index 95f72fab65..032d82f60b 100644 --- a/docs/developer-docs/latest/getting-started/introduction.md +++ b/docs/developer-docs/latest/getting-started/introduction.md @@ -7,7 +7,7 @@ description: This documentation contains all technical documentation related to This documentation contains all technical documentation related to the setup, deployment, update and customization of your Strapi application. -::: strapi Can't wait to start using Strapi? +::: strapi Can't wait to start using Strapi? You can directly head to the [Quick Start](quick-start.md)!
If demos are more your thing, we have a [video demo](https://youtu.be/zd0_S_FPzKg), or you can request a [live demo](https://strapi.io/demo)! ::: @@ -21,11 +21,10 @@ As it goes hand in hand with the open-source ecosystem, Strapi is open to contri - [`strapi/strapi`](https://github.com/strapi/strapi): main repository of Strapi, which contains the core of the project. You can find the admin panel, core plugins, plugin providers, and the whole code that runs your Strapi application. Please read the [`CONTRIBUTING.md`](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md) file to have more information about contributions to the main repository. - [`strapi/documentation`](https://github.com/strapi/documentation): contains the whole documentation of Strapi. Please read the [contribution guide](https://github.com/strapi/documentation/blob/main/CONTRIBUTING.md) to have more information about contributions to the Strapi documentation. -- [`strapi/buffet`](https://github.com/strapi/buffet): [Buffet](https://buffetjs.io) is the component library that is used in the admin panel. It brings consistency between the different admin plugins. +- [`strapi/design-system`](https://github.com/strapi/design-system): is the design system that is used in the admin panel. It brings consistency between the different admin plugins. - [`strapi/strapi-docker`](https://github.com/strapi/strapi-docker): contains the code used to generate the official Docker images for Strapi (available through our [Docker Hub](https://hub.docker.com/r/strapi/strapi)). - [`strapi/awesome-strapi`](https://github.com/strapi/awesome-strapi): contains everything the community built and all managed plugins. It is used as a central place to find and submit new packages such as plugins, middlewares, hooks, and general enhancements to the core of Strapi. - ## Strapi Community Strapi is a community-oriented project with an emphasis on transparency. The Strapi team has at heart to share their vision and build the future of Strapi with the Strapi community. This is why the [roadmap](https://portal.productboard.com/strapi) is open: as all insights are very important and will help steer the project in the right direction, any community member is most welcome to share ideas and opinions there. @@ -33,10 +32,9 @@ Strapi is a community-oriented project with an emphasis on transparency. The Str Community members also take great part in providing the whole community a plethora of resources about Strapi. You can find [tutorials](https://strapi.io/tutorials/) on the Strapi website, where you can also create your own. Also, as an open-source project, the technical documentation of Strapi is open to contributions (see [Open-source & Contribution](#open-source-contribution)). ::: strapi Want to join the community? -You can join [GitHub](https://github.com/strapi/strapi) and the [forum](https://forum.strapi.io/) and share your ideas and opinions with other community members and members of the Strapi team. If you're looking for news and updates about Strapi, [Twitter](https://twitter.com/strapijs) and the [blog](https://strapi.io/blog) are pretty good places to start! +You can join [GitHub](https://github.com/strapi/strapi), the [Forum](https://forum.strapi.io/), and the [Discord](https://discord.strapi.io) to share your ideas and opinions with other community members and members of the Strapi team. If you're looking for news and updates about Strapi, [Twitter](https://twitter.com/strapijs) and the [blog](https://strapi.io/blog) are pretty good places to start! ::: - ## Support Strapi is offered as free and open-source for users who wish to self-host the software. When having an issue or a question, the [forum](https://forum.strapi.io) is great first place to reach out for help. Both the Strapi community and core developers often check this platform and answer posts. diff --git a/docs/developer-docs/latest/setup-deployment-guides/file-structure.md b/docs/developer-docs/latest/setup-deployment-guides/file-structure.md index 9c0ba5a03b..dc7b0b8ad9 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/file-structure.md +++ b/docs/developer-docs/latest/setup-deployment-guides/file-structure.md @@ -40,10 +40,10 @@ The default structure of a Strapi project created without the starter CLI looks ├──── build # build of the admin panel ├──── config # API configurations │ ├──── src -│ │ ├ cron-tasks.js │ │ └ response-handlers.js │ ├ api.js │ ├ admin.js +│ ├ cron-tasks.js │ ├ database.js │ ├ middlewares.js │ ├ plugins.js @@ -61,8 +61,10 @@ The default structure of a Strapi project created without the starter CLI looks │ │ └──── (api-name) │ │ ├──── content-types │ │ │ └──── (content-type-name) +│ │ │ └ lifecyles.js │ │ │ └ schema.json │ │ ├──── controllers +│ │ ├──── middlewares │ │ ├──── policies │ │ ├──── routes │ │ ├──── services diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md index 1663e133fa..77843d13c8 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md @@ -5,11 +5,11 @@ description: Quickly deploy a Strapi application on DigitalOcean by simply using # DigitalOcean One-click -::: caution - The one-click install droplet is currently missing from DigitalOcean's marketplace. We are actively working with them on this issue and recommend you to use another installation method in the meantime. - ::: +::: warning +The one-click install droplet is currently missing from DigitalOcean's marketplace. We are not planning to continue support for this installation method but if you want to configure it yourself you can use our [one-click repo](https://github.com/strapi/one-click-deploy) to build the image yourself. +::: -The following documentation will guide you through the one-click creation of a new Strapi project hosted on [DigitalOcean](https://www.digitalocean.com/). +The following documentation will guide you through the one-click creation of a new Strapi project hosted on [DigitalOcean](https://www.digitalocean.com/) DigitalOcean is a cloud platform that helps to deploy and scale applications by offering an Infrastructure as a Service (IaaS) platform for developers. @@ -42,6 +42,6 @@ To visit your Strapi application: Visiting the Strapi application page for the first time will require to create the first administrator user. -::: strapi Customization options for the DigitalOcean droplet +::: strapi Customization options for the DigitalOcean droplet The DigitalOcean droplet includes everything you need to run Strapi. However, should you need to access and customize the droplet environment and change some of its settings, you may want to refer to [our dedicated documentation](/developer-docs/latest/setup-deployment-guides/installation/digitalocean-customization.md). You can also find the image generation [source code](https://github.com/strapi/one-click-deploy/tree/master/digital-ocean) on Strapi's GitHub. ::: From 8a085be7dbfcfd03cf25b94db033a77ee27e439c Mon Sep 17 00:00:00 2001 From: Derrick Mehaffy Date: Wed, 10 Nov 2021 13:14:42 -0700 Subject: [PATCH 2/4] more small fixes --- .../latest/getting-started/quick-start.md | 79 ++++++++++--------- .../latest/getting-started/troubleshooting.md | 14 +++- .../guides/registering-a-field-in-admin.md | 2 +- .../configurations/databases/sqlite.md | 2 +- .../hosting-guides/google-app-engine.md | 4 +- .../deployment/hosting-guides/heroku.md | 3 +- .../installation/cli.md | 12 +-- .../digitalocean-customization.md | 33 ++++---- .../installation/templates.md | 2 +- .../migration-guides.md | 12 ++- .../update-migration-guides/update-version.md | 38 +++------ 11 files changed, 102 insertions(+), 99 deletions(-) diff --git a/docs/developer-docs/latest/getting-started/quick-start.md b/docs/developer-docs/latest/getting-started/quick-start.md index 5af879e372..0a55e7f072 100644 --- a/docs/developer-docs/latest/getting-started/quick-start.md +++ b/docs/developer-docs/latest/getting-started/quick-start.md @@ -91,15 +91,16 @@ Make sure [Node.js and npm are properly installed](/developer-docs/latest/setup- 👇 Let's get started! Using the big buttons below, please choose between: -* the **Hands-on** path for a DIY approach to run your project -* or the **Starters** path for the quickest way to spin up a fullstack application powered by a Strapi back end. +- the **Hands-on** path for a DIY approach to run your project +- or the **Starters** path for the quickest way to spin up a fullstack application powered by a Strapi back end. :::::: tabs type:card + ::::: tab Hands-on -## 🚀 Part A: Create a new project with Strapi +## 🚀 Part A: Create a new project with Strapi ### Step 1: Run the installation script @@ -109,7 +110,7 @@ Run the following command in a terminal: ```bash -npx create-strapi-app my-project --quickstart +npx create-strapi-app@latest my-project --quickstart ``` @@ -157,7 +158,7 @@ Your restaurants directory will eventually include many restaurants, so we need 1. Go to [Plugins > Content-Type Builder](http://localhost:1337/admin/plugins/content-type-builder) in the main navigation. 2. Click on **Create new collection type**. -3. Type `restaurant` for the _Display name_, and click **Continue**. +3. Type `restaurant` for the _Display name_, and click **Continue**. 4. Click the Text field. 5. Type `name` in the _Name_ field. 6. Switch to the _Advanced Settings_ tab, and check the **Required field** and the **Unique field** settings. @@ -192,13 +193,14 @@ It would help getting a bit more organized if our restaurants directory had some ### Step 2: Use the collection types to create new entries Now that we have created a basic data structure with 2 collection types, "Restaurant" and "Category", let's use them to actually add content by creating new entries. + #### Create an entry for the "Restaurant" collection type 1. Go to [Collection types > Restaurants](http://localhost:1337/admin/plugins/content-manager/collectionType/application::restaurant.restaurant) in the main navigation. 2. Click on **Add New Restaurants**. 3. Type the name of your favorite local restaurant in the _Name_ field. Let's say it's `Biscotte Restaurant`. 4. In the _Description_ field, write a few words about it. If you're lacking some inspiration, you can use `Welcome to Biscotte restaurant! Restaurant Biscotte offers a cuisine based on fresh, quality products, often local, organic when possible, and always produced by passionate producers.` -5. Click **Save**. +5. Click **Save**. ![Screenshot: Biscotte Restaurant in Content Manager](../assets/quick-start-guide/qsg-handson-part2-03-restaurant.png) @@ -210,9 +212,9 @@ Let's go to [Collection types > Categories](http://localhost:1337/admin/plugins/ 1. Click on **Add New Categories**. 2. Type `French Food` in the _Name_ field. -4. Click **Save**. -5. Go back to _Collection types > Categories_, then click again on **Add New Categories**. -6. Type `Brunch` in the _Name_ field, then click **Save**. +3. Click **Save**. +4. Go back to _Collection types > Categories_, then click again on **Add New Categories**. +5. Type `Brunch` in the _Name_ field, then click **Save**. ![GIF: Add Categories](../assets/quick-start-guide/qsg-handson-categories.gif) @@ -222,7 +224,7 @@ The "French Food" and "Brunch" categories are now listed in the [Collection type Go to [Collection types > Restaurants](http://localhost:1337/admin/plugins/content-manager/collectionType/application::restaurant.restaurant) in the main navigation, and click on "Biscotte Restaurant". -In the right sidebar, in the **Categories** drop-down list, select "Brunch". Click **Save**. +In the right sidebar, in the **Categories** drop-down list, select "Brunch". Click **Save**. ### Step 3: Set Roles & Permissions @@ -247,13 +249,14 @@ First, navigate to [Collection types > Categories](http://localhost:1337/admin/p 1. Click the "Brunch" entry. 2. On the next screen, click **Publish**. -3. In the _Please confirm_ window, click **Yes, publish**. +3. In the _Please confirm_ window, click **Yes, publish**. Then, go back to the Categories list and repeat for the "French food" category. Finally, to publish your favorite restaurant, go to [Collection types > Restaurants](http://localhost:1337/admin/plugins/content-manager/collectionType/application::restaurant.restaurant), click the restaurant entry, and **Publish** it. ![GIF: Publish content](../assets/quick-start-guide/qsg-handson-publish.gif) + ### Step 5: Use the API OK dear gourmet, we have just finished creating our content and making it accessible through the API. You can give yourself a pat on the back — but you have yet to see the final result of your hard work. @@ -267,26 +270,26 @@ Try it now! The result should be similar to the example response below 👇. ```json [ { - "id":1, - "name":"Biscotte Restaurant", - "description":"Welcome to Biscotte restaurant! Restaurant Biscotte offers a cuisine based on fresh, quality products, often local, organic when possible, and always produced by passionate producers.", - "published_at":"2021-05-27T15:46:43.097Z", - "created_at":"2021-05-27T15:40:01.290Z", - "updated_at":"2021-05-27T15:46:43.110Z", - "categories":[ + "id": 1, + "name": "Biscotte Restaurant", + "description": "Welcome to Biscotte restaurant! Restaurant Biscotte offers a cuisine based on fresh, quality products, often local, organic when possible, and always produced by passionate producers.", + "published_at": "2021-05-27T15:46:43.097Z", + "created_at": "2021-05-27T15:40:01.290Z", + "updated_at": "2021-05-27T15:46:43.110Z", + "categories": [ { - "id":1, - "name":"French Food", - "published_at":"2021-05-27T15:46:14.704Z", - "created_at":"2021-05-27T15:41:59.725Z", - "updated_at":"2021-05-27T15:46:14.725Z" + "id": 1, + "name": "French Food", + "published_at": "2021-05-27T15:46:14.704Z", + "created_at": "2021-05-27T15:41:59.725Z", + "updated_at": "2021-05-27T15:46:14.725Z" }, { - "id":2, - "name":"Brunch", - "published_at":"2021-05-27T15:46:02.015Z", - "created_at":"2021-05-27T15:42:29.201Z", - "updated_at":"2021-05-27T15:46:02.035Z" + "id": 2, + "name": "Brunch", + "published_at": "2021-05-27T15:46:02.015Z", + "created_at": "2021-05-27T15:42:29.201Z", + "updated_at": "2021-05-27T15:46:02.035Z" } ] } @@ -300,7 +303,7 @@ Now your content is created, published, and you have permissions to request it t Keep on creating amazing content! ::: -## ⏩ What to do next? +## ⏩ What to do next? ### Consume your API @@ -330,14 +333,18 @@ To create a [Gatsby](https://www.gatsbyjs.com/) blog using Strapi, run the follo :::: tabs card ::: tab npm + ```bash npx create-strapi-starter my-project gatsby-blog ``` + ::: ::: tab yarn + ```bash yarn create strapi-starter my-project gatsby-blog ``` + :::: During the installation, when terminal asks `Choose your installation type`: select the default `Quickstart (recommended)` option by pressing Enter. The installation then resumes — just let the magic happen! @@ -346,15 +353,15 @@ During the installation, when terminal asks `Choose your installation type`: sel Once the installation is complete, your browser automatically opens 2 tabs: -* The first tab ([http://localhost:1337/admin/auth/register-admin](http://localhost:1337/admin/auth/register-admin)) is the admin panel, it's for the back end of your application. -* The second tab ([http://localhost:8000](http://localhost:8000)) is for the front end of your application, and you can already see the Gatsby blog in action. +- The first tab ([http://localhost:1337/admin/auth/register-admin](http://localhost:1337/admin/auth/register-admin)) is the admin panel, it's for the back end of your application. +- The second tab ([http://localhost:8000](http://localhost:8000)) is for the front end of your application, and you can already see the Gatsby blog in action. By completing the form in the first tab, you create your own account. Once done, you become the first administator user of this Strapi application. Welcome aboard, commander! -:::callout CONGRATULATIONS! 🥳 +:::callout CONGRATULATIONS! 🥳 Your blog is ready! You can start playing with Strapi and discover the product by yourself using our [User Guide](/user-docs/latest/getting-started/introduction.md), or proceed to part B below. Writing a blog is not your cup of tea? You can leave this guide and play with other [Starters](https://strapi.io/starters) on your own. @@ -437,7 +444,7 @@ After a few moments, you should see your blog with its updated title running at Now you know how to use Strapi to create and update your blog. Keep on creating amazing content! ::: -## ⏩ What to do next? +## ⏩ What to do next? The beauty of using Strapi [starters](https://strapi.io/starters) is that the Strapi back end comes with a front end ready out-of-the-box. Now you probably want to show your shiny new website to the world! The next step is then to deploy both the Strapi back end and the front end on the platforms of your choice: @@ -445,10 +452,10 @@ The beauty of using Strapi [starters](https://strapi.io/starters) is that the St 👉 Deploying the front end mostly depends on the technology it's based on. The easiest way to deploy your Gatsby blog front end is probably to [deploy on Gatsby Cloud](https://support.gatsbyjs.com/hc/en-us/articles/360052324714-Connecting-to-Strapi). -:::strapi To go further with starters +:::strapi To go further with starters -* Read more about the [starters CLI](https://strapi.io/blog/announcing-the-strapi-starter-cli) on our blog. -* Start another project! We have lots of other [Starters](https://strapi.io/starters) you can use to kickstart your blog, e-commerce, corporate website, or portfolio project. +- Read more about the [starters CLI](https://strapi.io/blog/announcing-the-strapi-starter-cli) on our blog. +- Start another project! We have lots of other [Starters](https://strapi.io/starters) you can use to kickstart your blog, e-commerce, corporate website, or portfolio project. ::::: diff --git a/docs/developer-docs/latest/getting-started/troubleshooting.md b/docs/developer-docs/latest/getting-started/troubleshooting.md index e7cca31c89..ad5ca8def7 100644 --- a/docs/developer-docs/latest/getting-started/troubleshooting.md +++ b/docs/developer-docs/latest/getting-started/troubleshooting.md @@ -10,7 +10,7 @@ Below are answers and solutions to most common issues that you may experience wh ## Why can't I create or update content-types in production/staging? -Strapi stores model configuration files (what defines the model schema) in files such as `api/restaurant/models/restaurant.settings.json`. Due to how Node.js works, in order for changes to take effect, that would require Node to restart the server. This could potentially cause downtime of your production service and likewise these changes should be tracked in some kind of source control. +Strapi stores model configuration files (what defines the model schema) in files such as `./src/api/restaurant/content-types/restaurant/schema.json`. Due to how Node.js works, in order for changes to take effect, that would require Node to restart the server. This could potentially cause downtime of your production service and likewise these changes should be tracked in some kind of source control. Generally your "flow" of development would follow the following path: @@ -44,6 +44,8 @@ With the components there is a hidden field called `order` that allows entries t For the time being there is no recommended way to handle this automatically and instead it may be required for you to create custom controllers to handle this within your own project. +We are evaluating if we will natively add support for this in the future. We will add more details when they become available. + ## Why are my application's database and uploads resetting on PaaS? If you used `--quickstart` to create your Strapi project, by default this uses the SQLite database. PaaS systems (Heroku, DigitalOcean Apps, Google App Engine, ect) file systems are typically [ephemeral](https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem) or read-only meaning that each time a dyno (container) is reset all filesystem changes are lost. And since both SQLite and local uploads are stored on the filesystem, any changes made to these since the last dyno reset will be deleted. Typically dynos are reset at least once a day, and in most cases multiple times per day or when new code is pushed to these services. @@ -64,10 +66,12 @@ For all these reasons, and others, we think it'll be a mistake and might confuse ## How do I customize a plugin? -Strapi uses a system called [extensions](/developer-docs/latest/development/plugins-extension.md) as plugins are stored in the `node_modules` folder. Due to this extensions work by Strapi detecting newer versions of files and using that as a replacement for the ones stored within the `node_modules`. +Strapi uses a system called [extensions](/developer-docs/latest/development/plugins-extension) as plugins are stored in the `node_modules` folder. Due to this extensions work by Strapi detecting newer versions of files and using that as a replacement for the ones stored within the `node_modules`. You gain the ability to modify these files without forking the plugin package, however you lose the ability to easily update. After each version release you will need to compare your changes to those in the new version and modify your version of the files accordingly. + + ## Can I add my own 3rd party auth provider? Yes, you can either follow the following [guide](/developer-docs/latest/plugins/users-permissions.md#adding-a-new-provider-to-your-project) or you can take a look at the [users-permissions](https://github.com/strapi/strapi/tree/master/packages/strapi-plugin-users-permissions) and submit a pull request to include the provider for everyone. Eventually Strapi does plan to move from the current grant/purest provider to a split natured system similar to the upload providers. @@ -76,7 +80,7 @@ There is currently no ETA on this migration however. ## Does Strapi allow me to change the default ID type or name? -No, currently does not have the ability to allow for changing the default id name nor does it allow you to switch the data type (such as UUID on bookshelf), support for this is being looked at for Strapi v4. +No, currently does not have the ability to allow for changing the default id name nor does it allow you to switch the data type (such as UUID in PostgreSQL), support for this is being looked at in future. ## Can you filter and/or deep filter on dynamic zones and polymorphic relations? @@ -90,8 +94,10 @@ On Linux based operating systems you need root permissions to bind to any port b Likewise since Strapi is Node.js based, in order for changes with the SSL certificate to take place (say when it expires) you would need to restart your application for that change to take effect. -Due to these two issues, it is recommended you use a proxy application such as Nginx, Apache, Traefik, or many others to handle your edge routing to Strapi. There are settings in the environment [server.json](/developer-docs/latest/setup-deployment-guides/configurations/required/server.md) to handle upstream proxies. The proxy block requires all settings to be filled out and will modify any backend plugins such as authentication providers and the upload plugin to replace your standard `localhost:1337` with the proxy URL. +Due to these two issues, it is recommended you use a proxy application such as [Nginx](/developer-docs/latest/setup-deployment-guides/deployment/optional-software/nginx-proxy), [Caddy](/developer-docs/latest/setup-deployment-guides/deployment/optional-software/caddy-proxy), [HAProxy](/developer-docs/latest/setup-deployment-guides/deployment/optional-software/haproxy-proxy), Apache, Traefik, or many others to handle your edge routing to Strapi. There are settings in the environment [server.json](/developer-docs/latest/setup-deployment-guides/configurations/required/server.md) to handle upstream proxies. The proxy block requires all settings to be filled out and will modify any backend plugins such as authentication providers and the upload plugin to replace your standard `localhost:1337` with the proxy URL. ## Is X feature available yet? You can see the [ProductBoard roadmap](https://portal.productboard.com/strapi) to see which feature requests are currently being worked on and which have not been started yet. + + diff --git a/docs/developer-docs/latest/guides/registering-a-field-in-admin.md b/docs/developer-docs/latest/guides/registering-a-field-in-admin.md index 0c06bce134..93f24932a1 100644 --- a/docs/developer-docs/latest/guides/registering-a-field-in-admin.md +++ b/docs/developer-docs/latest/guides/registering-a-field-in-admin.md @@ -32,7 +32,7 @@ yarn create strapi-app my-app --quickstart --no-run ``` # Create an application using SQLite and prevent the server from starting automatically as we will create a plugin # right after the project generation -npx create-strapi-app my-app --quickstart --no-run +npx create-strapi-app@latest my-app --quickstart --no-run ``` ::: diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md index 251a39fa08..c14d805af7 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md @@ -15,7 +15,7 @@ Simply use one of the following commands. ```sh -npx create-strapi-app my-project --quickstart +npx create-strapi-app@latest my-project --quickstart ``` diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md index 79c81cefea..79d2e1c10d 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.md @@ -14,12 +14,11 @@ In this guide we are going to: ### New Strapi project - ```sh -npx create-strapi-app my-project --quickstart +npx create-strapi-app@latest my-project --quickstart ``` @@ -31,7 +30,6 @@ yarn create strapi-app my-project --quickstart - When the setup completes, register an admin user using the form which opens in the browser. This user will be only relevant in local development. The `sqlite` database is created at `.tmp/data.db`. diff --git a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md index d8adff1d0a..431ef81d5b 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md +++ b/docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/heroku.md @@ -69,7 +69,7 @@ Create a [new Strapi project](/developer-docs/latest/getting-started/quick-start ```sh -npx create-strapi-app my-project --quickstart +npx create-strapi-app@latest my-project --quickstart ``` @@ -257,7 +257,6 @@ Unless you originally installed Strapi with PostgreSQL, you need to install the `Path: ./my-project/` - diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md index e38c20042f..c7dcf53d0a 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/cli.md @@ -30,18 +30,20 @@ The following installation guide covers the most basic installation option using - Using the `--quickstart` flag at the end of the command to directly create the project in quickstart mode. - Using the `--template` flag at the end of the command to create a project with pre-made Strapi configurations (see [Templates](templates.md)). +- Using the `--no-run` flag will prevent Strapi from automatically starting the server (useful in combination with `--quickstart`) + +For more information on available flags, see our [CLI documentation](/developer-docs/latest/developer-resources/cli/CLI). Strapi also offers a starters CLI to create a project with a pre-made frontend application (see [our dedicated blog post](https://strapi.io/blog/announcing-the-strapi-starter-cli)). ::: - 1. In a terminal, run the following command: ```sh -npx create-strapi-app my-project +npx create-strapi-app@latest my-project ``` @@ -54,8 +56,9 @@ yarn create strapi-app my-project 2. Choose an installation type: - * `Quickstart (recommended)`, which uses the default database (SQLite) - * `Custom (manual settings)`, which allows to choose your preferred database + + - `Quickstart (recommended)`, which uses the default database (SQLite) + - `Custom (manual settings)`, which allows to choose your preferred database 3. When terminal asks `Would you like to use a template?`, type `y` for yes or `n` for no then press Enter. @@ -84,4 +87,3 @@ yarn develop - diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-customization.md b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-customization.md index f3ba6ada7a..48588bd499 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-customization.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-customization.md @@ -7,14 +7,15 @@ You can click below for more information about the installed software and the Ng ::: details Installed software The Strapi application running on the droplet has the following softwares installed and configured: -| Software | Version | Comments | -|----------------|-----------------------|----------------| -| Node.js | 12 | Installed via the offical [apt repository](https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions)) | -| Yarn | latest stable version | Installed via the official [apt repository](https://classic.yarnpkg.com/en/docs/install/#debian-stable)) | -| Nginx | latest version | Installed via Ubuntu default repository | -| UFW (Uncomplicated Firewall) | latest stable version | Configured to only allow incoming ports 80 (HTTP), 443 (HTTPS), and 22 (SSH) | -| PostgreSQL | latest version | Installed via Ubuntu default repository | -| PM2 | latest version | Installed globally using Yarn | +| Software | Version | Comments | +| ---------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| Node.js | 12 | Installed via the offical [apt repository](https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions)) | +| Yarn | latest stable version | Installed via the official [apt repository](https://classic.yarnpkg.com/en/docs/install/#debian-stable)) | +| Nginx | latest version | Installed via Ubuntu default repository | +| UFW (Uncomplicated Firewall) | latest stable version | Configured to only allow incoming ports 80 (HTTP), 443 (HTTPS), and 22 (SSH) | +| PostgreSQL | latest version | Installed via Ubuntu default repository | +| PM2 | latest version | Installed globally using Yarn | + ::: ::::: details Nginx default configuration @@ -81,13 +82,12 @@ The Strapi application runs in the `development` environment to allow for creati To run the new `production` or `staging` environments you can refer to the [PM2 Documentation](https://pm2.keymetrics.io/docs/usage/quick-start/#managing-processes) - ### Accessing the service account To access your service account: 1. SSH into the `root` user. Depending on your Operating System or your SSH client, there may be multiple ways to do this. You should refer to your SSH client documentation for clarification on using SSH keys. -2. Run the `sudo su strapi` command. This will take you to the `strapi` user's shell. +2. Run the `sudo su strapi` command. This will take you to the `strapi` user's shell. To go back to the `root` user, run `exit`. @@ -99,17 +99,16 @@ Please note that by default the strapi user cannot run `sudo` commands. This is While identified as the service user on the DigitalOcean virtual machine, [PM2](https://pm2.keymetrics.io/docs/usage/quick-start/#managing-processes) can be used to control the Strapi process and view logs with the following commands: -* `pm2 list`: Show a list of all running processes. The default service is called "strapi-development" and should be running with an ID of 0. -* `pm2 restart strapi-development`: Restart the Strapi process manually. -* `pm2 stop strapi-development`: Stop the Strapi process. -* `pm2 start strapi-development`: Start the Strapi process. Strapi will automatically start if the virtual machine is rebooted. -* `pm2 logs strapi-development`: Show the logs in real time; to exit, use Ctrl+C. +- `pm2 list`: Show a list of all running processes. The default service is called "strapi-development" and should be running with an ID of 0. +- `pm2 restart strapi-development`: Restart the Strapi process manually. +- `pm2 stop strapi-development`: Stop the Strapi process. +- `pm2 start strapi-development`: Start the Strapi process. Strapi will automatically start if the virtual machine is rebooted. +- `pm2 logs strapi-development`: Show the logs in real time; to exit, use Ctrl+C. :::tip TIP You can also manually view the log files under `/srv/strapi/.pm2/logs` if you encounter any errors during the bootup. ::: - ## Strapi application access with ssh To ssh into your Strapi application, run the following command: @@ -129,9 +128,11 @@ To change the PostgreSQL password and update Strapi's config: 1. Log into the [`strapi`](#accessing-the-service-account) service user. 2. Run the `pm2 stop strapi-development` command to stop the current strapi process. 3. Run this command to change the password for the `strapi` database user: + ```bash psql -c "ALTER USER strapi with password '';" ``` + where `` should be replaced by the password you want to use. 4. Update the `/srv/strapi/strapi-development/.env` file with the new password: diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/templates.md b/docs/developer-docs/latest/setup-deployment-guides/installation/templates.md index 0a4fdc7caf..7ea029883b 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/templates.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/templates.md @@ -38,7 +38,7 @@ yarn create strapi-app my-project --template ::: tab npx ```bash -npx create-strapi-app my-project --template +npx create-strapi-app@latest my-project --template ``` ::: diff --git a/docs/developer-docs/latest/update-migration-guides/migration-guides.md b/docs/developer-docs/latest/update-migration-guides/migration-guides.md index af56c25e06..d8db587fd6 100644 --- a/docs/developer-docs/latest/update-migration-guides/migration-guides.md +++ b/docs/developer-docs/latest/update-migration-guides/migration-guides.md @@ -7,7 +7,7 @@ description: All the migration guides for a Strapi application. ## Instructions -When upgrading your application you will need to follow every migration guide between your current version and the one you are upgrading to. +When upgrading your application you will need to follow every migration guide between your current version and the one you are upgrading to. ::: tip TIP If there is no specific migration guide for your version step(s), you should follow the general [Update Strapi guide](update-version.md). @@ -25,7 +25,11 @@ If you were to upgrade your version from `3.2.3` to `3.6.1`, you would have to f 4. Migration guide from 3.4.x to 3.4.4. 5. [Update Strapi guide.](update-version.md) -## V3 guides +## v4-Stable guides + +At the moment there are no migration guides from v3-Stable to v4-Stable. These will be coming soon! + +## V3-Stable guides - [Migration guide from 3.4.x to 3.4.4](migration-guides/migration-guide-3.4.x-to-3.4.4.md) - [Migration guide from 3.3.x to 3.4.0](migration-guides/migration-guide-3.3.x-to-3.4.0.md) @@ -34,7 +38,7 @@ If you were to upgrade your version from `3.2.3` to `3.6.1`, you would have to f - [Migration guide from 3.1.x to 3.2.3](migration-guides/migration-guide-3.1.x-to-3.2.x.md) - [Migration guide from 3.0.x to 3.1.x](migration-guides/migration-guide-3.0.x-to-3.1.x.md) -## Beta guides +## v3-Beta guides ::: warning @@ -51,7 +55,7 @@ If you have issues upgrading, it's our general recommendation to create a new pr - [Migration guide from beta.16+ to beta.17.4](migration-guides/migration-guide-beta.16-to-beta.17.4.md) - [Migration guide from beta.15 to beta.16](migration-guides/migration-guide-beta.15-to-beta.16.md) -## Alpha guides +## v3-Alpha guides ::: warning diff --git a/docs/developer-docs/latest/update-migration-guides/update-version.md b/docs/developer-docs/latest/update-migration-guides/update-version.md index f07a81ae9b..5ba1bc4ac5 100644 --- a/docs/developer-docs/latest/update-migration-guides/update-version.md +++ b/docs/developer-docs/latest/update-migration-guides/update-version.md @@ -23,26 +23,20 @@ Before you start, make sure your server is not running until the end of the guid ## Upgrade your dependencies Start by upgrading all your Strapi packages in your `package.json`.
-For example upgrading from `3.4.4` to `3.6.1`: +For example upgrading from `4.0.0` to `4.0.1`: :::: tabs card -::: tab 3.4.4 +::: tab 4.0.0 ```json { //... "dependencies": { - "strapi": "3.4.4", - "strapi-admin": "3.4.4", - "strapi-connector-bookshelf": "3.4.4", - "strapi-plugin-content-manager": "3.4.4", - "strapi-plugin-content-type-builder": "3.4.4", - "strapi-plugin-email": "3.4.4", - "strapi-plugin-graphql": "3.4.4", - "strapi-plugin-upload": "3.4.4", - "strapi-plugin-users-permissions": "3.4.4", - "strapi-utils": "3.4.4" + "@strapi/plugin-documentation": "4.0.0", + "@strapi/plugin-i18n": "4.0.0", + "@strapi/plugin-users-permissions": "4.0.0", + "@strapi/strapi": "4.0.0" //... } } @@ -50,22 +44,16 @@ For example upgrading from `3.4.4` to `3.6.1`: ::: -::: tab 3.6.1 +::: tab 4.0.1 ```json { //... "dependencies": { - "strapi": "3.6.1", - "strapi-admin": "3.6.1", - "strapi-connector-bookshelf": "3.6.1", - "strapi-plugin-content-manager": "3.6.1", - "strapi-plugin-content-type-builder": "3.6.1", - "strapi-plugin-email": "3.6.1", - "strapi-plugin-graphql": "3.6.1", - "strapi-plugin-upload": "3.6.1", - "strapi-plugin-users-permissions": "3.6.1", - "strapi-utils": "3.6.1" + "@strapi/plugin-documentation": "4.0.1", + "@strapi/plugin-i18n": "4.0.1", + "@strapi/plugin-users-permissions": "4.0.1", + "@strapi/strapi": "4.0.1" //... } } @@ -78,7 +66,7 @@ For example upgrading from `3.4.4` to `3.6.1`: After editing the file run either `yarn install` or `npm install` to install the specified version. ::: tip -If the operation doesn't work, try removing your `yarn.lock` or `package-lock.json`. If that doesn't help, remove the `node_modules` folder as well and try again.. +If the operation doesn't work, try removing your `yarn.lock` or `package-lock.json`. If that doesn't help, remove the `node_modules` folder as well and try again.. ::: ## Rebuild your administration panel @@ -86,7 +74,6 @@ If the operation doesn't work, try removing your `yarn.lock` or `package-lock.js New releases can introduce changes to the administration panel that require a rebuild. Rebuild the admin panel with one of the following commands: - @@ -117,7 +104,6 @@ Just make sure when you update your version that a migration guide exists or not If you have followed the information above, you can start your application with: - From f0935e92b9e2c1d497b31709c9f8b230788e0403 Mon Sep 17 00:00:00 2001 From: Derrick Mehaffy Date: Wed, 10 Nov 2021 13:18:25 -0700 Subject: [PATCH 3/4] pr feedback --- .../latest/setup-deployment-guides/file-structure.md | 2 -- .../installation/digitalocean-one-click.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/file-structure.md b/docs/developer-docs/latest/setup-deployment-guides/file-structure.md index dc7b0b8ad9..64abae295d 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/file-structure.md +++ b/docs/developer-docs/latest/setup-deployment-guides/file-structure.md @@ -39,8 +39,6 @@ The default structure of a Strapi project created without the starter CLI looks ├──── .tmp ├──── build # build of the admin panel ├──── config # API configurations -│ ├──── src -│ │ └ response-handlers.js │ ├ api.js │ ├ admin.js │ ├ cron-tasks.js diff --git a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md index 77843d13c8..f063648b9a 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md +++ b/docs/developer-docs/latest/setup-deployment-guides/installation/digitalocean-one-click.md @@ -5,7 +5,7 @@ description: Quickly deploy a Strapi application on DigitalOcean by simply using # DigitalOcean One-click -::: warning +::: caution The one-click install droplet is currently missing from DigitalOcean's marketplace. We are not planning to continue support for this installation method but if you want to configure it yourself you can use our [one-click repo](https://github.com/strapi/one-click-deploy) to build the image yourself. ::: From 389c84b448d1ef8a1da13e3ffbbfcc917ee331d8 Mon Sep 17 00:00:00 2001 From: Derrick Mehaffy Date: Wed, 10 Nov 2021 14:19:05 -0700 Subject: [PATCH 4/4] fix api config defaults --- .../configurations/optional/api.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/optional/api.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/optional/api.md index 9dc8a48d0c..cde3e92597 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/optional/api.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/optional/api.md @@ -9,13 +9,13 @@ description: General settings for API calls can be set in the `./config/api.js` file: -| Property | Description | Type | Default | -| ----------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------ | ------- | -| `responses` | Global API response configuration | Object | - | -| `responses.privateAttributes` | Set of globally defined attributes to be treated as private. | String array | `[]` | -| `rest` | REST API configuration | Object | - | -| `rest.defaultLimit` | Default `limit` parameter used in API calls (see [REST API documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md#pagination-by-offset)) | Integer | `100` | -| `rest.maxLimit` | Maximum allowed number that can be requested as `limit` (see [REST API documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md#pagination-by-offset)).

Defaults to `null`, which fetches all results. | Integer | `null` | +| Property | Description | Type | Default | +| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------- | +| `responses` | Global API response configuration | Object | - | +| `responses.privateAttributes` | Set of globally defined attributes to be treated as private. | String array | `[]` | +| `rest` | REST API configuration | Object | - | +| `rest.defaultLimit` | Default `limit` parameter used in API calls (see [REST API documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md#pagination-by-offset)) | Integer | `25` | +| `rest.maxLimit` | Maximum allowed number that can be requested as `limit` (see [REST API documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md#pagination-by-offset)).

Defaults to `null`, which fetches all results. | Integer | `100` | **Example:**