Improve markdown doc
Fix for markdown headers and tables
This commit is contained in:
parent
9951102dd2
commit
b82062e106
@ -1,7 +1,7 @@
|
|||||||
PHPDocker.io generated environment
|
PHPDocker.io generated environment
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
#Add to your project#
|
# Add to your project#
|
||||||
|
|
||||||
Simply, unzip the file into your project, this will create `docker-compose.yml` on the root of your project and a folder named `phpdocker` containing nginx and php-fpm config for it.
|
Simply, unzip the file into your project, this will create `docker-compose.yml` on the root of your project and a folder named `phpdocker` containing nginx and php-fpm config for it.
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ Ensure the webserver config on `docker\nginx.conf` is correct for your project.
|
|||||||
|
|
||||||
Note: you may place the files elsewhere in your project. Make sure you modify the locations for the php-fpm dockerfile, the php.ini overrides and nginx config on `docker-compose.yml` if you do so.
|
Note: you may place the files elsewhere in your project. Make sure you modify the locations for the php-fpm dockerfile, the php.ini overrides and nginx config on `docker-compose.yml` if you do so.
|
||||||
|
|
||||||
#How to run#
|
# How to run
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
|
|
||||||
@ -18,16 +18,16 @@ Dependencies:
|
|||||||
|
|
||||||
Once you're done, simply `cd` to your project and run `docker-compose up -d`. This will initialise and start all the containers, then leave them running in the background.
|
Once you're done, simply `cd` to your project and run `docker-compose up -d`. This will initialise and start all the containers, then leave them running in the background.
|
||||||
|
|
||||||
##Services exposed outside your environment##
|
## Services exposed outside your environment
|
||||||
|
|
||||||
You can access your application via **`localhost`**, if you're running the containers directly, or through **``** when run on a vm. nginx and mailhog both respond to any hostname, in case you want to add your own hostname on your `/etc/hosts`
|
You can access your application via **`localhost`**, if you're running the containers directly, or through **``** when run on a vm. nginx and mailhog both respond to any hostname, in case you want to add your own hostname on your `/etc/hosts`
|
||||||
|
|
||||||
Service|Address outside containers
|
Service | Address outside containers
|
||||||
------|---------|-----------
|
------ | ---------
|
||||||
Webserver|[localhost:8000](http://localhost:8000)
|
Webserver | [localhost:8000](http://localhost:8000)
|
||||||
MySQL|**host:** `localhost`; **port:** `8002`
|
MySQL | **host:** `localhost`; **port:** `8002`
|
||||||
|
|
||||||
##Hosts within your environment##
|
## Hosts within your environment
|
||||||
|
|
||||||
You'll need to configure your application to use any services you enabled:
|
You'll need to configure your application to use any services you enabled:
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ Service|Hostname|Port number
|
|||||||
php-fpm|php-fpm|9000
|
php-fpm|php-fpm|9000
|
||||||
MySQL|mysql|3306 (default)
|
MySQL|mysql|3306 (default)
|
||||||
|
|
||||||
#Docker compose cheatsheet#
|
# Docker compose cheatsheet#
|
||||||
|
|
||||||
**Note:** you need to cd first to where your docker-compose.yml file lives.
|
**Note:** you need to cd first to where your docker-compose.yml file lives.
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ MySQL|mysql|3306 (default)
|
|||||||
* Run symfony console, `docker-compose exec php-fpm bin/console`
|
* Run symfony console, `docker-compose exec php-fpm bin/console`
|
||||||
* Open a mysql shell, `docker-compose exec mysql mysql -uroot -pCHOSEN_ROOT_PASSWORD`
|
* Open a mysql shell, `docker-compose exec mysql mysql -uroot -pCHOSEN_ROOT_PASSWORD`
|
||||||
|
|
||||||
#Recommendations#
|
# Recommendations
|
||||||
|
|
||||||
It's hard to avoid file permission issues when fiddling about with containers due to the fact that, from your OS point of view, any files created within the container are owned by the process that runs the docker engine (this is usually root). Different OS will also have different problems, for instance you can run stuff in containers using `docker exec -it -u $(id -u):$(id -g) CONTAINER_NAME COMMAND` to force your current user ID into the process, but this will only work if your host OS is Linux, not mac. Follow a couple of simple rules and save yourself a world of hurt.
|
It's hard to avoid file permission issues when fiddling about with containers due to the fact that, from your OS point of view, any files created within the container are owned by the process that runs the docker engine (this is usually root). Different OS will also have different problems, for instance you can run stuff in containers using `docker exec -it -u $(id -u):$(id -g) CONTAINER_NAME COMMAND` to force your current user ID into the process, but this will only work if your host OS is Linux, not mac. Follow a couple of simple rules and save yourself a world of hurt.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user