@@ -4,6 +4,9 @@ Docker environment required to run Laravel (based on official php and mysql dock
44[ ![ Actions Status] ( https://github.com/systemsdk/docker-apache-php-laravel/workflows/Laravel%20App/badge.svg )] ( https://github.com/systemsdk/docker-apache-php-laravel/actions )
55[ ![ CircleCI] ( https://circleci.com/gh/systemsdk/docker-apache-php-laravel.svg?style=svg )] ( https://circleci.com/gh/systemsdk/docker-apache-php-laravel )
66[ ![ Coverage Status] ( https://coveralls.io/repos/github/systemsdk/docker-apache-php-laravel/badge.svg )] ( https://coveralls.io/github/systemsdk/docker-apache-php-laravel )
7+ [ ![ Total Downloads] ( https://img.shields.io/packagist/dt/systemsdk/docker-apache-php-laravel )] ( https://packagist.org/packages/systemsdk/docker-apache-php-laravel )
8+ [ ![ Latest Stable Version] ( https://img.shields.io/packagist/v/systemsdk/docker-apache-php-laravel )] ( https://packagist.org/packages/systemsdk/docker-apache-php-laravel )
9+ [ ![ MIT licensed] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( LICENSE )
710
811[ Source code] ( https://github.com/systemsdk/docker-apache-php-laravel.git )
912
@@ -15,42 +18,71 @@ Docker environment required to run Laravel (based on official php and mysql dock
1518
1619Note: OS recommendation - Linux Ubuntu based.
1720
18- ## Components:
21+ ## Components
19221 . Apache 2.4
20232 . PHP 8.0 (Apache handler)
21243 . MySQL 8
22254 . Laravel 8
2326
24- ## Setting up PROD environment
25- 1.Clone this repository from GitHub.
26-
27- 2.Edit docker-compose-prod.yml and set necessary user/password for MySQL.
27+ ## Setting up DEV environment
28+ 1.You can clone this repository from GitHub or install via composer.
2829
2930Note: Delete storage/mysql-data folder if it is exist.
3031
31- 3.Edit env.prod and set necessary user/password for MySQL.
32+ If you have installed composer and want to install environment via composer you can use next cmd command:
33+ ``` bash
34+ composer create-project systemsdk/docker-apache-php-laravel example-app
35+ ```
3236
33- 4.Build, start and install the docker images from your terminal :
37+ 2.Add domain to local 'hosts' file :
3438``` bash
35- make build-prod
36- make start-prod
39+ 127.0.0.1 localhost
3740```
3841
39- 5.Make sure that you have installed migrations:
42+ 3.Configure ` /docker/dev/xdebug.ini ` (optional):
43+
44+ - In case you need debug only requests with IDE KEY: PHPSTORM from frontend in your browser:
4045``` bash
41- make migrate-no-test
46+ xdebug.start_with_request = no
47+ ```
48+ Install locally in Firefox extension "Xdebug helper" and set in settings IDE KEY: PHPSTORM
49+
50+ - In case you need debug any request to an api (by default):
51+ ``` bash
52+ xdebug.start_with_request = yes
53+ ```
54+
55+ 4.Build and start the image from your terminal:
56+ ``` bash
57+ make build
58+ make start
59+ make composer-install
60+ make env-dev
61+ ```
62+
63+ 5.Make sure that you have installed migrations/seeds:
64+ ``` bash
65+ make migrate
66+ make seed
4267```
4368
44696.Set key for application:
4570``` bash
4671make key-generate
4772```
4873
49- ## Setting up STAGING environment
50- 1.Clone this repository from GitHub.
74+ 7.Check and open in your browser next url: [ http://localhost ] ( http://localhost ) .
75+
76+ ## Setting up STAGING environment locally
77+ 1.You can clone this repository from GitHub or install via composer.
5178
5279Note: Delete storage/mysql-data folder if it is exist.
5380
81+ If you have installed composer and want to install environment via composer you can use next cmd command:
82+ ``` bash
83+ composer create-project systemsdk/docker-apache-php-laravel example-app
84+ ```
85+
54862.Build, start and install the docker images from your terminal:
5587``` bash
5688make build-staging
@@ -67,50 +99,36 @@ make migrate-no-test
6799make key-generate
68100```
69101
70- ## Setting up DEV environment
71- 1.Clone this repository from GitHub.
102+ ## Setting up PROD environment locally
103+ 1.You can clone this repository from GitHub or install via composer .
72104
73105Note: Delete storage/mysql-data folder if it is exist.
74106
75- 2.Add domain to local 'hosts' file :
107+ If you have installed composer and want to install environment via composer you can use next cmd command :
76108``` bash
77- 127.0.0.1 localhost
109+ composer create-project systemsdk/docker-apache-php-laravel example-app
78110```
79111
80- 3.Configure ` / docker/dev/xdebug.ini ` (optional):
112+ 2.Edit docker-compose-prod.yml and set necessary user/password for MySQL.
81113
82- - In case you need debug only requests with IDE KEY: PHPSTORM from frontend in your browser:
83- ``` bash
84- xdebug.start_with_request = no
85- ```
86- Install locally in Firefox extension "Xdebug helper" and set in settings IDE KEY: PHPSTORM
114+ 3.Edit env.prod and set necessary user/password for MySQL.
87115
88- - In case you need debug any request to an api (by default) :
116+ 4.Build, start and install the docker images from your terminal :
89117``` bash
90- xdebug.start_with_request = yes
118+ make build-prod
119+ make start-prod
91120```
92121
93- 4.Build and start the image from your terminal :
122+ 5.Make sure that you have installed migrations :
94123``` bash
95- make build
96- make start
97- make composer-install
98- make env-dev
124+ make migrate-no-test
99125```
100126
101- 5 .Set key for application:
127+ 6 .Set key for application:
102128``` bash
103129make key-generate
104130```
105131
106- 6.Make sure that you have installed migrations/seeds:
107- ``` bash
108- make migrate
109- make seed
110- ```
111-
112- 7.In order to use this application, please open in your browser next url: [ http://localhost ] ( http://localhost ) .
113-
114132## Getting shell to container
115133After application will start (` make start ` ) and in order to get shell access inside laravel container you can run following command:
116134``` bash
@@ -236,3 +254,8 @@ Notes: Please see more commands in Makefile
2362544 . Iterate as needed.
2372555 . Make sure that "All checks have passed" on CircleCI(or another one in case you are not using CircleCI) and status is green.
2382566 . When PR is approved, it will be squashed & merged, into ` develop ` and later merged into ` release/{No} ` for deployment.
257+
258+ Note: You can find git flow detail example [ here] ( https://danielkummer.github.io/git-flow-cheatsheet ) .
259+
260+ ## License
261+ [ The MIT License (MIT)] ( LICENSE )
0 commit comments