Skip to content

Commit 0b90f9d

Browse files
author
José Fernando Cordova
committed
update readme and inserting docker-compose-pwd
1 parent 535f1e1 commit 0b90f9d

File tree

2 files changed

+37
-7
lines changed

2 files changed

+37
-7
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
* Apache 2
88
* MySQL
99
* Docker
10-
11-
[![Try in PWD](https://cdn.rawgit.com/play-with-docker/stacks/cff22438/assets/images/button.png)](http://play-with-docker.com?stack=https://raw.githubusercontent.com/jfernancordova/docker-laravel-api-dev/master/docker-compose.yml)
1210

13-
## Docker Instructions
11+
## Docker Environments
1412

1513
### Swarm Modes
1614
In the root directory:
@@ -20,18 +18,25 @@ In the root directory:
2018
In the root directory:
2119
<pre><code>docker-compose -f docker-compose.yml up --build -d</code></pre>
2220

21+
### PWD
22+
With Play with Docker and following the docker instructions, it is easy to deploy and test this environment!
23+
24+
[![Try in PWD](https://cdn.rawgit.com/play-with-docker/stacks/cff22438/assets/images/button.png)](http://play-with-docker.com?stack=https://raw.githubusercontent.com/jfernancordova/docker-laravel-api-dev/master/docker-compose-pwd.yml)
25+
26+
## Docker Instructions
27+
2328
### Execute Laravel Pre-requisites
2429
In the root directory:
25-
<pre><code>docker container exec dockerlaravelapidev_php_1 composer install && cp.env.example .env && php artisan key:generate && php artisan migrate</code></pre>
30+
<pre><code>docker container exec [dockerlaravelapidev_php_1 or container Id] composer install && cp.env.example .env && php artisan key:generate && php artisan migrate</code></pre>
2631

2732
### How to fix Error: laravel.log could not be opened?
28-
In the root directory:
33+
In the root directory or inside the container php:
2934
<pre><code>chmod -R 775 storage </code></pre>
3035
* 7 - Owner can write
3136
* 7 - Group can write
3237
* 5 - Others cannot write!
3338
Reference:
34-
(https://stackoverflow.com/questions/23411520/how-to-fix-error-laravel-log-could-not-be-opened)
39+
https://stackoverflow.com/questions/23411520/how-to-fix-error-laravel-log-could-not-be-opened
3540

3641
### API Boilerplate Reference
37-
(https://github.com/francescomalatesta/laravel-api-boilerplate-jwt/blob/master/readme.md)
42+
https://github.com/francescomalatesta/laravel-api-boilerplate-jwt/blob/master/readme.md

docker-compose-pwd.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: '3'
2+
services:
3+
php:
4+
image: jfernancordova/docker-laravel-api-dev
5+
depends_on:
6+
- db
7+
deploy:
8+
mode: replicated
9+
replicas: 1
10+
ports:
11+
- "80:80"
12+
db:
13+
image: mysql:5.7
14+
ports:
15+
- 13306:3306
16+
environment:
17+
MYSQL_DATABASE: apiLaravelDocker
18+
MYSQL_USER: apiLaravelDocker
19+
MYSQL_PASSWORD: apiLaravelDocker
20+
MYSQL_ROOT_PASSWORD: apiLaravelDocker
21+
deploy:
22+
mode: replicated
23+
replicas: 1
24+
restart_policy:
25+
condition: none

0 commit comments

Comments
 (0)