Skip to content

Commit 97991a8

Browse files
authored
Better Docker commands (#1789)
* Better Docker commands * better commands
1 parent 6fad2d2 commit 97991a8

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

distribution/index.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
>
77
> —Fabien Potencier (creator of Symfony)
88
9-
[API Platform](https://api-platform.com) is a powerful yet easy to use **full stack** framework dedicated to API-driven projects and implementing the [Jamstack](https://jamstack.org/) architecture.
9+
[API Platform](https://api-platform.com) is a powerful yet easy-to-use **full stack** framework dedicated to API-driven projects and implementing the [Jamstack](https://jamstack.org/) architecture.
1010

1111
## Introduction
1212

@@ -30,12 +30,12 @@ The easiest and most powerful way to get started is [to download the API Platfor
3030

3131
To discover how the framework works, we will create an API to manage a bookshop.
3232

33-
To create a fully featured API, an admin interface and a Progressive Web App using Next.js, all you need is to design **the public data
33+
To create a fully featured API, an admin interface, and a Progressive Web App using Next.js, all you need is to design **the public data
3434
model of our API** and handcraft it as *Plain Old PHP Objects*.
3535

3636
API Platform uses these model classes to expose and document a web API having a bunch of built-in features:
3737

38-
* creating, retrieving, updating and deleting (CRUD) resources
38+
* creating, retrieving, updating, and deleting (CRUD) resources
3939
* data validation
4040
* pagination
4141
* filtering
@@ -51,7 +51,7 @@ API Platform uses these model classes to expose and document a web API having a
5151

5252
One more thing, before we start: as the API Platform distribution includes [the Symfony framework](https://symfony.com),
5353
it is compatible with most [Symfony bundles](https://flex.symfony.com)
54-
(plugins) and benefits from [the numerous extensions points](../core/extending.md) provided by this rock-solid foundation (events, Dependency Injection Container...).
54+
(plugins) and benefits from [the numerous extension points](../core/extending.md) provided by this rock-solid foundation (events, Dependency Injection Container...).
5555
Adding features like custom or service-oriented API endpoints, JWT or OAuth authentication, HTTP caching, mail sending or
5656
asynchronous jobs to your APIs is straightforward.
5757

@@ -73,26 +73,26 @@ Similarly, on Windows, only [Docker for Windows](https://docs.docker.com/docker-
7373
Open a terminal, and navigate to the directory containing your project skeleton. Run the following command to start all
7474
services using [Docker Compose](https://docs.docker.com/compose/):
7575

76-
Download the latest versions of the images:
76+
Build the images:
7777

7878
```console
79-
docker compose pull --include-deps
79+
docker compose build --no-cache
8080
```
8181

82-
Then build images and Start Docker Compose in detached mode:
82+
Then, start Docker Compose in detached mode:
8383

8484
```console
85-
docker compose up --wait
85+
docker compose up --pull --wait
8686
```
8787

88-
**Tip:** be sure that the ports `80`, `443` and `5432` of the host are not already in use. The usual offenders are Apache, NGINX and Postgres. If they are running, stop them and run `docker compose up --wait` again.
88+
**Tip:** Be sure that the ports `80`, `443`, and `5432` of the host are not already in use. The usual offenders are Apache, NGINX, and Postgres. If they are running, stop them and run `docker compose up --wait` again.
8989

9090
This starts the following services:
9191

9292
| Name | Description |
9393
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9494
| caddy | [Caddy web server](caddy.md) with the [Mercure](../core/mercure.md) (real-time and async) and [Vulcain](https://vulcain.rocks) (relations preloading) modules |
95-
| php | The API with PHP 8, Composer and sensitive configs |
95+
| php | The API with PHP 8, Composer, and sensitive configs |
9696
| pwa | Next.js project compatible with Create Client and having Admin preinstalled |
9797
| database | PostgreSQL database server |
9898

@@ -122,19 +122,19 @@ you'll get auto-completion for almost everything and awesome quality analysis.
122122

123123
[PHP IntelliSense for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=zobo.php-intellisense) also works well, and is free and open source.
124124

125-
The API Platform distribution comes with a dummy entity for test purpose: `api/src/Entity/Greeting.php`. We will remove
125+
The API Platform distribution comes with a dummy entity for test purposes: `api/src/Entity/Greeting.php`. We will remove
126126
it later.
127127

128128
If you're used to the PHP ecosystem, you probably guessed that this test entity uses the industry-leading [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html)
129-
library as persistence system. It is shipped, in the API Platform distribution.
129+
library as a persistence system. It is shipped, in the API Platform distribution.
130130

131131
Doctrine ORM is the easiest way to persist and query data in an API Platform project thanks to the bridge shipped with the
132132
distribution, but it's also entirely optional, and [you may prefer to plug your own persistence system](../core/design.md).
133133

134134
The Doctrine Bridge is optimized for performance and development convenience. For instance, when using Doctrine, API Platform
135135
is able to automatically optimize the generated SQL queries by adding the appropriate `JOIN` clauses. It also provides a
136136
lot of powerful [built-in filters](../core/filters.md).
137-
Doctrine ORM and its bridge support most popular RDBMS including PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite.
137+
Doctrine ORM and its bridge support the most popular RDBMS including PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite.
138138
There is also a shipped [Doctrine MongoDB ODM](https://www.doctrine-project.org/projects/mongodb-odm.html) optional support.
139139

140140
That being said, keep in mind that API Platform is 100% independent of the persistence system. You can use the one(s) that
@@ -744,7 +744,7 @@ occurs**.
744744

745745
## A Next.js Web App
746746

747-
API Platform also has an awesome [client generator](../create-client/index.md) able to scaffold fully working Next.js, Nuxt.js, React/Redux, Vue.js, Quasar and Vuetify Progressive Web Apps that you can easily tune and customize. The generator also supports
747+
API Platform also has an awesome [client generator](../create-client/index.md) able to scaffold fully working Next.js, Nuxt.js, React/Redux, Vue.js, Quasar, and Vuetify Progressive Web Apps that you can easily tune and customize. The generator also supports
748748
[React Native](https://facebook.github.io/react-native/) if you prefer to leverage all capabilities of mobile devices.
749749

750750
The distribution comes with a skeleton ready to welcome the [Next.js](https://nextjs.org/) flavor of the generated code. To bootstrap your app, run:
@@ -780,16 +780,16 @@ Then, there are many more features to learn! Read [the full documentation](../co
780780
and how to extend API Platform to fit your needs.
781781
API Platform is incredibly efficient for prototyping and Rapid Application Development (RAD), but the framework is mostly
782782
designed to create complex API-driven projects, far beyond simple CRUD apps. It benefits from [**strong extension points**](../core/extending.md)
783-
and it is **continuously optimized for [performance](../core/performance.md).** It powers numerous high traffic websites.
783+
and it is **continuously optimized for [performance](../core/performance.md).** It powers numerous high-traffic websites.
784784

785-
API Platform has a built-in HTTP cache invalidation system which allows to make API Platform apps blazing fast using [Varnish](https://varnish-cache.org/). Read more in the chapter
785+
API Platform has a built-in HTTP cache invalidation system which allows making API Platform apps blazing fast using [Varnish](https://varnish-cache.org/). Read more in the chapter
786786
[API Platform Core Library: Enabling the Built-in HTTP Cache Invalidation System](../core/performance.md#enabling-the-built-in-http-cache-invalidation-system).
787787

788-
Keep in mind that you can use your favorite client-side technology: API Platform provides generators for popular JavaScript frameworks, but you can also use your preferred client-side technology including Angular, Ionic and Swift directly. Any language able to send HTTP
788+
Keep in mind that you can use your favorite client-side technology: API Platform provides generators for popular JavaScript frameworks, but you can also use your preferred client-side technology including Angular, Ionic, and Swift directly. Any language able to send HTTP
789789
requests is OK (even COBOL can do that).
790790

791791
To go further, the API Platform team maintains a demo application showing more advanced use cases like leveraging serialization
792-
groups, user management or JWT and OAuth authentication. [Checkout the demo code source on GitHub](https://github.com/api-platform/demo)
792+
groups, user management, or JWT and OAuth authentication. [Checkout the demo code source on GitHub](https://github.com/api-platform/demo)
793793
and [browse it online](https://demo.api-platform.com).
794794

795795
## Screencasts

0 commit comments

Comments
 (0)