You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker compose -f docker-compose.yml -f docker-compose.prod.yml up --wait
71
+
docker compose -f compose.yaml -f compose.prod.yaml up --wait
72
72
```
73
73
74
74
Be sure to replace `your-domain-name.example.com` by your actual domain name and to set the values of `APP_SECRET`, `CADDY_MERCURE_JWT_SECRET` to cryptographically secure random values.
@@ -84,7 +84,7 @@ Alternatively, if you don't want to expose an HTTPS server but only an HTTP one,
Copy file name to clipboardExpand all lines: deployment/traefik.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
This tutorial will help you to define your own routes for your client, API and more generally for your containers.
10
10
11
-
Use this custom API Platform `docker-compose.yml` file which implements ready-to-use Træfik container configuration. Override
11
+
Use this custom API Platform `compose.yaml` file which implements ready-to-use Træfik container configuration. Override
12
12
ports and add labels to tell Træfik to listen on the routes mentioned and redirect routes to a specified container.
13
13
14
14
A few points to note:
@@ -39,7 +39,7 @@ Then you edited your `admin/Dockerfile` and `client/Dockerfile` like this:
39
39
After that, don't forget to re-build your containers
40
40
41
41
```yaml
42
-
# docker-compose.yml
42
+
# compose.yaml
43
43
version: '3.4'
44
44
45
45
x-cache-from:
@@ -190,12 +190,12 @@ If your network is of type B, it may conflict with the Træfik sub-network.
190
190
191
191
## Going Further
192
192
193
-
As this Træfik configuration listens on 80 and 443 ports, you can run only 1 Træfik instance per server. However, you may want to run multiple API Platform projects on the same server. To deal with it, you'll have to externalize the Træfik configuration to another `docker-compose.yml` file, anywhere on your server.
193
+
As this Træfik configuration listens on 80 and 443 ports, you can run only 1 Træfik instance per server. However, you may want to run multiple API Platform projects on the same server. To deal with it, you'll have to externalize the Træfik configuration to another `compose.yaml` file, anywhere on your server.
194
194
195
195
Here is a working example:
196
196
197
197
```yaml
198
-
# /somewhere/docker-compose.yml
198
+
# /somewhere/compose.yaml
199
199
version: '3.4'
200
200
201
201
services:
@@ -224,10 +224,10 @@ networks:
224
224
# Add other networks here
225
225
```
226
226
227
-
Then update the `docker-compose.yml` file belonging to your API Platform projects:
227
+
Then update the `compose.yaml` file belonging to your API Platform projects:
Copy file name to clipboardExpand all lines: distribution/debugging.md
+6-37
Original file line number
Diff line number
Diff line change
@@ -27,43 +27,11 @@ RUN set -eux; \
27
27
28
28
## Configure Xdebug with Docker Compose Override
29
29
30
-
Using an [override](https://docs.docker.com/compose/reference/overview/#specifying-multiple-compose-files) file named
31
-
`docker-compose.override.yml` ensures that the production configuration remains untouched.
32
-
33
-
As an example, an override could look like this:
34
-
35
-
```yml
36
-
version: "3.4"
37
-
38
-
services:
39
-
php:
40
-
build:
41
-
target: api_platform_php_dev
42
-
environment:
43
-
# See https://docs.docker.com/docker-for-mac/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
44
-
# See https://github.com/docker/for-linux/issues/264
45
-
# The `remote_host` below may optionally be replaced with `remote_connect_back`
46
-
# XDEBUG_MODE required for step debugging
47
-
XDEBUG_MODE: debug
48
-
# default port for Xdebug 3 is 9003
49
-
# idekey=VSCODE if you are debugging with VSCode
50
-
XDEBUG_CONFIG: >-
51
-
client_host=host.docker.internal
52
-
idekey=PHPSTORM
53
-
# This should correspond to the server declared in PHPStorm `Preferences | Languages & Frameworks | PHP | Servers`
54
-
# Then PHPStorm will use the corresponding path mappings
55
-
PHP_IDE_CONFIG: serverName=api-platform
56
-
```
57
-
58
-
Note for Mac environments use the following:
59
-
60
-
```yml
61
-
XDEBUG_CONFIG: >-
62
-
idekey=PHPSTORM
63
-
client_host=docker.for.mac.localhost
64
-
```
30
+
XDebug is shipped by default with the API Platform distribution.
31
+
To enable it, run: `XDEBUG_MODE=debug docker compose up --wait`
65
32
66
-
In VSCode, alongside the default PHP configuration in `launch.json`, you'll need path mappings for the Docker image.
33
+
If you are using VSCode, use the following `launch.json` to debug.
34
+
Note that this configuration includes the path mappings for the Docker image.
67
35
68
36
```json
69
37
{
@@ -83,7 +51,8 @@ In VSCode, alongside the default PHP configuration in `launch.json`, you'll need
83
51
}
84
52
```
85
53
86
-
Note: For Linux environments, the `client_host` setting of `host.docker.internal` will not work, you will need the actual local IP address of your computer.
54
+
Note: On Linux, the `client_host` setting of `host.docker.internal` may not work.
55
+
In this case you will need the actual local IP address of your computer.
0 commit comments