Skip to content

Commit b778a86

Browse files
Improve instructions for running on Mac
1 parent e24cb90 commit b778a86

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ will prohibit the application from running in production mode.
6767
### Docker images
6868

6969
When running with your own Docker image, make sure to mount the project folder
70-
to wherever it will be hosted by the Docker container.
70+
to wherever the image expects it to be, e.g. `/app` or `/var/www`.
7171

7272
For instance:
7373

@@ -83,6 +83,20 @@ docker run \
8383
php:7.1 \
8484
php --docroot /app/web/ --server "localhost:${PORT}" /app/web/index.php
8585
```
86+
Or on Mac:
87+
```
88+
export PORT=8080 && \
89+
docker run \
90+
--env "PORT=${PORT}" \
91+
--expose "${PORT}" \
92+
-p "${PORT}:${PORT}" \
93+
--rm \
94+
--volume "$PWD:/app" \
95+
-it \
96+
php:7.1 \
97+
php --docroot /app/web/ --server "localhost:${PORT}" /app/web/index.php
98+
```
99+
86100

87101
### Local environment
88102

@@ -91,12 +105,12 @@ falls outside the scope of this project.
91105

92106
For development purposes, the internal PHP HTTP server _is_ explained below.
93107

94-
#### Build-in PHP HTTP server
108+
#### Built-in PHP HTTP server
95109

96-
For development purposes a Composer `serve` command has been provided. This will
110+
For development purposes a Composer `serve-dev` command has been provided. This will
97111
run the application using PHP internal HTTP server.
98112

99-
To use it, run `composer serve` in the project root.
113+
To use it, run `composer serve-dev` in the project root.
100114

101115
**!!! FOR SECURITY REASONS, DO NOT USE THIS METHOD IN PRODUCTION !!!**
102116

0 commit comments

Comments
 (0)