|
8 | 8 | * MySQL
|
9 | 9 | * Xdebug
|
10 | 10 | * Docker
|
11 | | - |
12 | | -## Docker Environments |
13 | 11 |
|
14 | | -### Swarm Mode |
15 | | -Clone this respository and run the following commands: |
16 | | -```bash |
17 | | -cd docker-laravel-api-dev/ |
18 | | -# Creating mount folder |
19 | | -mkdir .docker/local-mysql-datadir |
20 | | -docker stack deploy -c docker-compose.yml docker-laravel-api-dev |
21 | | -# wait for it and follow the docker instructions!... |
22 | | -``` |
23 | | -### Docker Compose |
24 | | -Clone this respository and run the following commands: |
25 | | -```bash |
26 | | -cd docker-laravel-api-dev/ |
27 | | -docker-compose -f docker-compose.yml up --build -d |
28 | | -# wait for it to build!... |
29 | | -``` |
30 | | -### PWD |
31 | | -With Play with Docker and following the docker instructions, it is easy to deploy and test this environment! |
| 12 | +### Environments |
32 | 13 |
|
33 | | -[](http://play-with-docker.com?stack=https://raw.githubusercontent.com/jfernancordova/docker-laravel-api-dev/feature/refactoring/docker-compose-pwd.yml) |
| 14 | +* docker-compose-dev.yml: generate automatically folders and require-dev dependencies on your local workspace including Xdebug, however the yaml file has a key called: |
| 15 | +"XDEBUG_MODE", this yaml by default has the value true (1) to install it. |
34 | 16 |
|
35 | | -## Docker Instructions |
| 17 | +* docker-compose-pwd.yml: you can use it in [](http://play-with-docker.com?stack=https://raw.githubusercontent.com/jfernancordova/docker-laravel-api-dev/feature/refactoring/docker-compose-pwd.yml), to visualize this environment and test it, however you should see the container lists to verify the HEALTHCHECK. |
36 | 18 |
|
37 | | -In the root directory: |
38 | 19 | ```bash
|
39 | 20 | # container lists
|
40 | 21 | docker ps
|
41 | 22 | # make sure that the docker dockerlaravelapidev_php_1 or php container is (healthy),
|
42 | | -normally the process begins in starting mode (2 or 3 minutes) |
| 23 | +normally the process begins in starting mode (health: starting), |
43 | 24 | ```
|
44 | 25 |
|
45 | | -### Environments |
| 26 | +* docker-compose-prod.yml: if you are going to use this yaml, make sure to generate the migrations before!, however you can modify the entrypoint to generate them. |
46 | 27 |
|
47 | | -* docker-compose-dev.yml: generate automatically severals folders and require-dev dependencies on your local. (Including Xdebug). |
48 | | - |
49 | | -* docker-compose-pwd.yml: you can use it in play with docker and test its process. |
| 28 | +## Docker Environments |
50 | 29 |
|
51 | | -* docker-compose-prod.yml: if you are going to use this yaml, make sure to generate the migrations before, however you can modify the entrypoint. |
| 30 | +### Swarm Mode |
| 31 | +Clone this respository and run the following commands: |
| 32 | +```bash |
| 33 | +cd docker-laravel-api-dev/ |
| 34 | +docker stack deploy -c docker-compose-dev.yml docker-laravel-api-dev |
| 35 | +# wait for the HEALTHCHECK in healthy mode |
| 36 | +``` |
52 | 37 |
|
| 38 | +### Docker Compose |
| 39 | +Clone this respository and run the following commands: |
| 40 | +```bash |
| 41 | +cd docker-laravel-api-dev/ |
| 42 | +docker-compose -f docker-compose-dev.yml up --build -d |
| 43 | +or to see the logs |
| 44 | +docker-compose -f docker-compose-dev.yml up |
| 45 | +# wait for the HEALTHCHECK in healthy mode |
| 46 | +``` |
53 | 47 |
|
54 | 48 | ### API Boilerplate Reference
|
55 | 49 | https://github.com/francescomalatesta/laravel-api-boilerplate-jwt/blob/master/readme.md
|
0 commit comments