installation.md 1.93 KB
Newer Older
Sebastian Castro's avatar
Sebastian Castro committed
1
2
3
4
5
6
7
8
9
10
11
12
Installation and Production Instructions
========================================

Feel free to add some more informations if you solve installation issues !

Requirements
------------

1. Php
2. [Composer](https://getcomposer.org/download/) 
3. [Nodejs](https://nodejs.org/en/download/)
4. [Git](https://git-scm.com/)
Sebastian Castro's avatar
Sebastian Castro committed
13
14
15
5. Php Server (Apache, [Wamp server](http://www.wampserver.com/) for example)
6. MongoDB (http://php.net/manual/fr/mongodb.installation.php)
7. Any Text Editor (SublimeText for example)
Sebastian Castro's avatar
Sebastian Castro committed
16
17
18
19

Installation
------------

20
### Cloning repo (clone dev branch)
Sebastian Castro's avatar
Sebastian Castro committed
21
22
```
cd path-to-php-server-folder (default linux /var/www/html, windows c:/wamp/www... )
23
git clone -b dev https://github.com/Biopenlandes/CartoV3.git
Sebastian Castro's avatar
Sebastian Castro committed
24
25
26
27
28
29
30
31
cd CartoV3/
```

### Installing dependencies 
Php dependency (symfony, bundles...) 
```
php path-to/composer.phar install or composer install
```
Sebastian Castro's avatar
Sebastian Castro committed
32
*During installation, config/parameters file will be created, leave default fields*
Sebastian Castro's avatar
Sebastian Castro committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

Workflow dependencies (compiling sass and javascript)
```
npm install -g gulp
npm install
```

Start
-----
Dumping assets
```
php bin/console assets:install --symlink web
```

First build of Javascript and Css
```
gulp build
```

Start watching for file change (automatic recompile)
```
gulp watch
```


Generate Database
-----------------

Go to symfony console : http://localhost/PagesVertes/web/app_dev.php/_console
```
Sebastian Castro's avatar
Sebastian Castro committed
63
doctrine:mongodb:schema:create
Sebastian Castro's avatar
Sebastian Castro committed
64
65
doctrine:mongodb:fixtures:load BiopenGeoDirectoryBundle
doctrine:mongodb:fixtures:load BiopenCoreBundle
Sebastian Castro's avatar
Sebastian Castro committed
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
```

Then generate if necessary random point on the map :
http://localhost/cartoV3/PagesVertes/web/app_dev.php/acteurs/generate/500

Everthing is ready, enjoy :
http://localhost/PagesVertes/web/app_dev.php

Production
----------

1. Generate compressed js and css files
```gulp production```

2. Move files to distant Server (FTP or other)

3. In the distant console (http://yoursite.com/web/app_dev.php/_console)
```
cache:clear --env=prod
assetic:dump --env=prod
```