Skip to content

Commit e64ebeb

Browse files
authored
Update readme.md
1 parent b74229e commit e64ebeb

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

readme.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,42 @@
11
## Initial setup
22

3+
Go into the webroot.
4+
35
> docker run -it --rm -v $(pwd):/app -w /app verwilst/npm install
46
57
> docker run -it --rm -v $(pwd):/app -w /app verwilst/php7-cli composer install
68
9+
Make sure to chown all the data in your webroot to your own user, since docker sets ownership to added files to root.
10+
11+
chown <myuser>: . -R
12+
713
## How to run
814

915
> docker run --name myproject -it -d -v $(pwd):/app -w /app -p 8000:8000 verwilst/php7-cli php artisan serve --host=0.0.0.0
1016
17+
You can now open your browser on http://127.0.0.1:8000 .
18+
19+
The project is configured to support live reloading. The browser opens a websocket to port 35729, so make sure it's accessible:
20+
1121
> docker run --name myproject-gulp -it -d -v $(pwd):/app -p 35729:35729 -w /app verwilst/gulp watch
1222
1323
## When MongoDB is needed
1424

15-
> docker run --name mongo -v $(pwd):/app -d mongo
25+
> docker run --name mongo -d mongo
1626
1727
> docker run --name myproject -it -d --link mongo:mongo -v $(pwd):/app -w /app -p 8000:8000 verwilst/php7-cli php artisan serve --host=0.0.0.0
1828
1929
Using the MongoDB console is as easy as calling:
2030

2131
> docker exec -it mongo mongo admin
2232
33+
## When MySQL/Percona is needed
34+
35+
> docker run --name percona -e MYSQL_ALLOW_EMPTY_PASSWORD=true -d percona
36+
37+
> docker run --name myproject -it -d --link percona:percona -v $(pwd):/app -w /app -p 8000:8000 verwilst/php7-cli php artisan serve --host=0.0.0.0
38+
39+
Using the MySQL console is as easy as calling:
40+
41+
> docker exec -it percona mysql
42+

0 commit comments

Comments
 (0)