Skip to content

Commit 95577b9

Browse files
update readme
1 parent a48bda5 commit 95577b9

File tree

1 file changed

+32
-9
lines changed

1 file changed

+32
-9
lines changed

README.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@
1111
## Docker Environments
1212

1313
### Swarm Mode
14-
In the root directory and following the Docker instructions:
15-
<pre><code># Creating mount folder
14+
Clone this respository and run the following commands:
15+
```bash
16+
cd docker-laravel-api-dev/
17+
# Creating mount folder
1618
mkdir .docker/local-mysql-datadir
17-
docker stack deploy -c docker-compose.yml api-laravel-docker
18-
</code></pre>
19-
19+
docker stack deploy -c docker-compose.yml docker-laravel-api-dev
20+
# wait for it and follow the docker instructions!...
21+
```
2022
### Docker Compose
21-
In the root directory:
22-
<pre><code>docker-compose -f docker-compose.yml up --build -d</code></pre>
23-
23+
Clone this respository and run the following commands:
24+
```bash
25+
cd docker-laravel-api-dev/
26+
docker-compose -f docker-compose.yml up --build -d
27+
# wait for it to build and follow the docker instructions!...
28+
```
2429
### PWD
2530
With Play with Docker and following the docker instructions, it is easy to deploy and test this environment!
2631

@@ -30,7 +35,25 @@ With Play with Docker and following the docker instructions, it is easy to deplo
3035

3136
### Execute Laravel Pre-requisites
3237
In the root directory:
33-
<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>
38+
```bash
39+
# container lists
40+
docker ps
41+
# next, execute an interactive bash shell on the php container.
42+
docker container exec -t -i [dockerlaravelapidev_php_1 or container Id] bash
43+
```
44+
#### Run the following commands:
45+
46+
## Compose and Swarm Mode
47+
```bash
48+
composer install && cp .env.example .env && php artisan key:generate && php artisan migrate
49+
chmod 755 -R storage
50+
# foward to the port 80, go to localhost and enjoy! ...
51+
```
52+
## Play With Docker (PWD)
53+
```bash
54+
composer install && php artisan migrate
55+
# foward to the port 80, go to localhost and enjoy! ...
56+
```
3457

3558
### How to fix Error: laravel.log could not be opened?
3659
In the root directory or inside the container php:

0 commit comments

Comments
 (0)