Skip to content

Commit e55b66c

Browse files
committed
Fix renamed Docker Compose service "web" or "php" to "app"
1 parent 75876a6 commit e55b66c

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

deployment/docker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ stack is shipped with the API Platform distribution.
77
To install it, run the following commands (Docker must be installed on your system):
88

99
$ docker-compose up -d # Download, build and run Docker images
10-
$ docker-compose exec php bin/console doctrine:schema:create # Create the MySQL schema
10+
$ docker-compose exec app bin/console doctrine:schema:create # Create the MySQL schema
1111

1212
Your project will be accessible at the URL `http://127.0.0.1`.
1313

distribution/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ almost everything.
7171
The API Platform Standard Edition comes with a dummy entity for test purpose: `src/AppBundle/Entity/Foo.php`. We will remove
7272
it later, but for now, create the related database table:
7373

74-
$ docker-compose exec php bin/console doctrine:schema:create
74+
$ docker-compose exec app bin/console doctrine:schema:create
7575

76-
The `php` container is where your project stands. Prefixing a command by `docker-compose exec php` allows to execute the
76+
The `app` container is where your project stands. Prefixing a command by `docker-compose exec app` allows to execute the
7777
given command in the container. You may want [to create an alias](http://www.linfo.org/alias.html) to easily run commands
7878
inside the container.
7979

@@ -94,14 +94,14 @@ Instead of using Docker, API Platform can also be installed on the local machine
9494
$ composer create-project api-platform/api-platform bookshop-api
9595

9696
Then, enter the project folder, create the database and its schema:
97-
97+
9898
$ cd bookshop-api
99-
$ php bin/console doctrine:database:create
100-
$ php bin/console doctrine:schema:create
99+
$ bin/console doctrine:database:create
100+
$ bin/console doctrine:schema:create
101101

102102
And start the server:
103-
104-
$ php bin/console server:run
103+
104+
$ bin/console server:run
105105

106106
## It's ready!
107107

@@ -287,12 +287,12 @@ or in Kévin's book "[Persistence in PHP with the Doctrine ORM](https://www.amaz
287287
As we used private properties (but API Platform as well as Doctrine can also work with public ones), we need to create the
288288
corresponding accessor methods. Run the following command or use the code generation feature of your IDE to generate them:
289289

290-
$ docker-compose exec php bin/console doctrine:generate:entities AppBundle
290+
$ docker-compose exec app bin/console doctrine:generate:entities AppBundle
291291

292292
Then, delete the file `src/AppBundle/Entity/Foo.php`, this demo entity isn't useful anymore.
293293
Finally, tell Doctrine to sync the database's tables structure with our new data model:
294294

295-
$ docker-compose exec php bin/console doctrine:schema:update --force
295+
$ docker-compose exec app bin/console doctrine:schema:update --force
296296

297297
We now have a working data model that you can persist and query. To create an API endpoint with CRUD capabilities corresponding
298298
to an entity class, we just have to mark it with an annotation called `@ApiResource`:

distribution/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ The API Platform flavor of Behat also comes with a temporary SQLite database ded
160160

161161
Clear the cache of the `test` environment:
162162

163-
$ docker-compose php web bin/console cache:clear --env=test
163+
$ docker-compose app bin/console cache:clear --env=test
164164

165165
Then run:
166166

167-
$ docker-compose run --rm php vendor/bin/behat`.
167+
$ docker-compose run --rm app vendor/bin/behat`.
168168

169169
Everything should be green now. Your Linked Data API is now specified and tested thanks to Behat!
170170

schema-generator/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
If you use [the official distribution of API Platform](../distribution/index.md), the Schema Generator is already installed as a development dependency of your project and can be invoked through Docker:
66

7-
$ docker-compose exec php vendor/bin/schema
7+
$ docker-compose exec app vendor/bin/schema
88

99
The Schema Generator can also [be downloaded independently as a PHAR](https://github.com/api-platform/schema-generator/releases) or installed in an existing project using [Composer](https://getcomposer.org):
1010

@@ -53,7 +53,7 @@ types:
5353
5454
Run the generator with this config file as parameter:
5555
56-
$ docker-compose exec php vendor/bin/schema generate-types src/ app/config/schema.yml
56+
$ docker-compose exec app vendor/bin/schema generate-types src/ app/config/schema.yml
5757
5858
The following classes will be generated:
5959
@@ -745,7 +745,7 @@ When cardinality cannot be automatically extracted, it's value is set to `unknow
745745

746746
Usage:
747747

748-
$ docker-compose exec php vendor/bin/schema extract-cardinalities
748+
$ docker-compose exec app vendor/bin/schema extract-cardinalities
749749

750750
Previous chapter: [Introduction](index.md)
751751

troubleshooting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is a list of common pitfalls on using API Platform, and how to avoid them.
99
If you get errors like the following when running `docker-compose up` on Windows:
1010

1111
```
12-
ERROR: for web Cannot create container for service web: Invalid bind mount spec "C:\\Users\\Kevin\\api-platform:/app:rw": Invalid volume specification: 'C:\Users\Kevin\api-platform:/app:rw'
12+
ERROR: for app Cannot create container for service app: Invalid bind mount spec "C:\\Users\\Kevin\\api-platform:/srv/api-platform:rw": Invalid volume specification: 'C:\Users\Kevin\api-platform:/srv/api-platform:rw'
1313
←[31mERROR←[0m: Encountered errors while bringing up the project.
1414
```
1515

@@ -21,9 +21,9 @@ COMPOSE_CONVERT_WINDOWS_PATHS=1
2121

2222
### Error starting userland proxy
2323

24-
If the web container cannot start and display this `Error starting userland proxy: Bind for 0.0.0.0:80`, it means that the port 80 is already used.
24+
If the `app` container cannot start and display this `Error starting userland proxy: Bind for 0.0.0.0:80`, it means that port 80 is already in use.
2525

26-
The configuration docker is planned to be launch on the port 80 in the `docker-compose.yml` file.
26+
You can change the port to be used in the `docker-compose.yml` file (default is port 80).
2727

2828
## Using API Platform and JMS Serializer in the same project
2929

0 commit comments

Comments
 (0)