Skip to content

Commit 8232961

Browse files
committed
changed license to MIT; restructure scripts and tidied up readme
1 parent 6101d21 commit 8232961

File tree

5 files changed

+67
-20
lines changed

5 files changed

+67
-20
lines changed

.htaccess

100755100644
File mode changed.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020-present The Phalcon PHP Framework
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,50 @@ To run this application on your machine, you need at least:
1919
* [Nginx][4] Web Server
2020
* Latest stable [Phalcon Framework release][5] extension enabled
2121

22-
You can also run the application using [nanobox.io][8]. Installation instructions for nanobox can be found [here][9].
23-
24-
## Running the application
22+
## Running the application locally
2523

2624
* Clone the repository to a folder on your machine
2725
* Navigate to that folder
28-
* Run `nanobox run`
29-
* After the application compiles you will see `/app $` in your terminal. Type `php-server` to run apache
30-
* Navigate to the IP address displayed in the console.
26+
* Run `docker compose up -d`
27+
* After the build process is completed, you will have the following:
28+
* PHP 8.0 (`tutorial-8.0`)
29+
* PHP 8.1 (`tutorial-8.1`)
30+
* PHP 8.2 (`tutorial-8.2`)
31+
* PHP 8.3 (`tutorial-8.3`)
32+
* You can check the application on your local browser by finding the IP address of the chosen environment and launching it. For example, if you wish to check the PHP 8.3 environment, type the following in your terminal:
33+
34+
```shell
35+
docker inspect tutorial-8.3
36+
```
37+
This will output a JSON file, where you can find the IP address of the container on your local machine.
38+
39+
```shell
40+
...
41+
"EndpointID": "563ba90563ffb7ad5c30689f1216ec4c2e1625d170eb0279e78c001973464691",
42+
"Gateway": "172.29.0.1",
43+
"IPAddress": "172.29.0.5",
44+
"IPPrefixLen": 16,
45+
...
46+
```
47+
48+
Launch a browser and visit the site using that IP address (`http://172.29.0.5`)
49+
50+
To enter an environment and run different commands, such as populating the database:
51+
52+
```shell
53+
docker exec -it tutorial-8.3 /bin/bash
54+
```
3155

3256
## License
3357

34-
Phalcon Tutorial is open-sourced software licensed under the [New BSD License][6]. © Phalcon Framework Team and
58+
Phalcon Tutorial is open-sourced software licensed under the [MIT][6]. © Phalcon Framework Team and
3559
contributors
3660

37-
[1]: https://docs.phalcon.io/latest/en/tutorial-basic
38-
61+
[1]: https://docs.phalcon.io/latest/tutorial-basic
3962
[2]: http://httpd.apache.org/
40-
4163
[3]: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
42-
4364
[4]: http://nginx.org/
44-
4565
[5]: https://github.com/phalcon/cphalcon/releases
46-
47-
[6]: https://github.com/phalcon/tutorial/blob/master/docs/LICENSE.md
48-
66+
[6]: https://github.com/phalcon/tutorial/blob/master/docs/LICENSE
4967
[7]: https://github.com/phalcon/phalcon-devtools
50-
51-
[8]: https://nanobox.io
52-
53-
[9]: https://docs.nanobox.io/install/
68+
[8]: https://docker.com

bin/import_db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
mysql --user=$DATA_MYSQL_USER \
44
--password=$DATA_MYSQL_PASS \
55
--host=$DATA_MYSQL_HOST \
6-
gonano < /app/storage/schemas/tutorial.sql
6+
phalcon_tutorial < /code/resources/schemas/tutorial.sql

phpcs.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Phalcon">
3+
<description>Phalcon Coding Standards</description>
4+
<arg value="-colors"/>
5+
<arg value="s"/>
6+
<arg value="p"/>
7+
<rule ref="PSR12">
8+
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
9+
</rule>
10+
<file>src</file>
11+
</ruleset>

0 commit comments

Comments
 (0)