Skip to content

Commit 411122d

Browse files
author
Codeliner
committed
Use php 5.4 internal webserver
1 parent ca42c66 commit 411122d

File tree

4 files changed

+51
-52
lines changed

4 files changed

+51
-52
lines changed

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ services:
88
before_script:
99
- composer self-update
1010
- composer update
11-
- sudo add-apt-repository ppa:ondrej/php5
12-
- sudo apt-get update > /dev/null
13-
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-intl
14-
- sudo sed -i -e "s,/var/www,$(pwd)/public,g" /etc/apache2/sites-available/default
15-
- sudo /etc/init.d/apache2 restart
1611
- mysql -e 'create database cargo_sample;'
1712
- mysql -uroot cargo_sample < ./scripts/cargo_sample.sql
1813
- cp ./config/autoload/local.php.dist ./config/autoload/local.php
@@ -22,6 +17,8 @@ before_script:
2217
- "export DISPLAY=:99.0"
2318
- "wget http://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar"
2419
- "java -jar selenium-server-standalone-2.31.0.jar > /dev/null &"
20+
# webserver setup
21+
- php -S localhost:8000 -t public/ &
2522
- sleep 5
2623

2724

README.md

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,7 @@ and let us focus on the Domain Driven Design implementation. Both can be replace
1414

1515
The original cargo sample written in java can be found [here](http://dddsample.sourceforge.net/).
1616

17-
Installation
18-
------------
19-
20-
Using Git and Composer (recommended)
21-
-----------------------------------
22-
Clone the repository and manually invoke `composer` using the shipped
23-
`composer.phar`:
24-
25-
cd my/www/dir
26-
git clone https://github.com/codeliner/php-ddd-cargo-sample.git
27-
cd php-ddd-cargo-sample
28-
php composer.phar self-update
29-
php composer.phar install
30-
31-
(The `self-update` directive is to ensure you have an up-to-date `composer.phar`
32-
available.)
33-
34-
Setup a Database
35-
----------------
36-
Our sample works with a MySql database so you need a running MySql Server and an
37-
empty test db called `cargo_sample`. Then you can use the [cargo_sample.sql](https://github.com/codeliner/php-ddd-cargo-sample/blob/master/scripts/cargo_sample.sql) to create all
38-
required tables, but beware that each release chips with it's own `cargo_sample.sql`.
39-
When you switch from one chapter to another you have to recreate the database schema.
40-
Finally copy and rename the [local.php.dist](https://github.com/codeliner/php-ddd-cargo-sample/blob/master/config/autoload/local.php.dist) to `local.php`
41-
and fill in your database credentials.
42-
43-
Web Server Setup
44-
----------------
45-
46-
### Apache Setup
47-
48-
To setup apache, setup a virtual host to point to the public/ directory of the
49-
project and you should be ready to go! It should look something like below:
50-
51-
<VirtualHost *:80>
52-
ServerName cargo-sample.localhost
53-
DocumentRoot /path/to/php-ddd-cargo-sample/public
54-
SetEnv APPLICATION_ENV "development"
55-
<Directory /path/to/php-ddd-cargo-sample/public>
56-
DirectoryIndex index.php
57-
AllowOverride All
58-
Order allow,deny
59-
Allow from all
60-
</Directory>
61-
</VirtualHost>
17+
[> Instalation](https://github.com/codeliner/php-ddd-cargo-sample/blob/master/docs/installation.md)
6218

6319
Goal of the Project
6420
-------------------
@@ -114,5 +70,6 @@ In Chapter Two we learn the importance of the Ubiquitous Language. With it's hel
11470

11571
Support
11672
-------
117-
If you have any problems with the application please let me know and send me an email `kontakt[at]codeliner[dot]ws`.
73+
If you have any problems with the application please let me know and send me an email `kontakt[at]codeliner[dot]ws` or open a [GitHub issues](https://github.com/codeliner/php-ddd-cargo-sample/issues?state=open).
74+
Same applies if you have a question or a feature wish. Maybe we've missed a concept that you hoped to find in our example.
11875

config/behat.yml.travis

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ default:
77
goutte: ~
88
selenium2: ~
99
# The base URL to cargo sample
10-
base_url: http://localhost/index.php/
10+
base_url: http://localhost:8000/index.php/

docs/installation.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Installation
2+
============
3+
4+
Using Git and Composer (recommended)
5+
-----------------------------------
6+
Clone the repository and manually invoke `composer` using the shipped
7+
`composer.phar`:
8+
9+
cd my/www/dir
10+
git clone https://github.com/codeliner/php-ddd-cargo-sample.git
11+
cd php-ddd-cargo-sample
12+
php composer.phar self-update
13+
php composer.phar install
14+
15+
(The `self-update` directive is to ensure you have an up-to-date `composer.phar`
16+
available.)
17+
18+
Setup a Database
19+
----------------
20+
Our sample works with a MySql database so you need a running MySql Server and an
21+
empty test db called `cargo_sample`. Then you can use the [cargo_sample.sql](https://github.com/codeliner/php-ddd-cargo-sample/blob/master/scripts/cargo_sample.sql) to create all
22+
required tables, but beware that each release chips with it's own `cargo_sample.sql`.
23+
When you switch from one chapter to another you have to recreate the database schema.
24+
Finally copy and rename the [local.php.dist](https://github.com/codeliner/php-ddd-cargo-sample/blob/master/config/autoload/local.php.dist) to `local.php`
25+
and fill in your database credentials.
26+
27+
Web Server Setup
28+
----------------
29+
30+
### Apache Setup
31+
32+
To setup apache, setup a virtual host to point to the public/ directory of the
33+
project and you should be ready to go! It should look something like below:
34+
35+
<VirtualHost *:80>
36+
ServerName cargo-sample.localhost
37+
DocumentRoot /path/to/php-ddd-cargo-sample/public
38+
SetEnv APPLICATION_ENV "development"
39+
<Directory /path/to/php-ddd-cargo-sample/public>
40+
DirectoryIndex index.php
41+
AllowOverride All
42+
Order allow,deny
43+
Allow from all
44+
</Directory>
45+
</VirtualHost>

0 commit comments

Comments
 (0)