-
Notifications
You must be signed in to change notification settings - Fork 12
Install instruc #79
Install instruc #79
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,92 @@ | ||
insalan.fr | ||
========== | ||
# insalan.fr | ||
|
||
[![Build Status](https://travis-ci.org/InsaLan/insalan.fr.svg?branch=master)](https://travis-ci.org/InsaLan/insalan.fr) | ||
[![Maintainability](https://api.codeclimate.com/v1/badges/68707ca6cd1a2b332dc4/maintainability)](https://codeclimate.com/github/InsaLan/insalan.fr/maintainability) | ||
[![Test Coverage](https://api.codeclimate.com/v1/badges/68707ca6cd1a2b332dc4/test_coverage)](https://codeclimate.com/github/InsaLan/insalan.fr/test_coverage) | ||
|
||
Website to handle esport tournament | ||
|
||
Installation | ||
------------ | ||
|
||
Download vendors | ||
Considering you have composer.phar installed and in your PATH : | ||
## Installation | ||
|
||
The project need the following package and php-extension : | ||
|
||
Package | Comment | ||
------- | ------- | ||
git | | ||
php | php7.0 | ||
composer | | ||
mariadb-server | if use with local database | ||
zip | not necessary (only for unzip during install) | ||
|
||
PHP extension | Comment | ||
------------- | ------- | ||
php-curl | | ||
php-intl | date translation | ||
php-mbstring | doctrine:create:schema:create | ||
php-mysql | | ||
php-xml | | ||
|
||
|
||
### Linux | ||
|
||
|
||
#### Base packages | ||
|
||
Update your local packages | ||
|
||
```bash | ||
sudo apt-get update && apt-get upgrade | ||
``` | ||
|
||
Install git and clone the repository | ||
|
||
```bash | ||
sudo apt-get install git | ||
git clone https://github.com/InsaLan/insalan.fr | ||
``` | ||
|
||
It is recommended to get `composer.phar` in your PATH : https://getcomposer.org/doc/00-intro.md | ||
|
||
Install the remaining packages | ||
|
||
```bash | ||
sudo apt-get install php php-curl php-intl php-mbstring php-mysql php-xml mariadb-server zip | ||
``` | ||
|
||
Proceed with the install and accept default settings | ||
|
||
```bash | ||
cd insalan.fr | ||
composer.phar install | ||
``` | ||
|
||
If not set with composer.phar, configure symfony2 : | ||
At this point, you should be able to run the web server but any pages you try to access will return an error since the database is not setup. | ||
|
||
|
||
#### mariadb | ||
|
||
Log in mariadb as root | ||
|
||
```bash | ||
cp app/config/parameters.yml.dist app/config/parameters.yml | ||
vim app/config/parameters.yml | ||
sudo mysql -u root -p | ||
``` | ||
|
||
Create database, user and grant access | ||
|
||
```mariadb | ||
CREATE DATABASE insalan; | ||
CREATE USER insalan@'localhost'; | ||
GRANT ALL PRIVILEGES ON insalan.* to insalan@'localhost'; | ||
``` | ||
|
||
Create database & load fixtures (php-mbstring needed) | ||
|
||
#### Fill database and run | ||
|
||
Load fixtures (php-mbstring needed) | ||
|
||
```bash | ||
php app/console doctrine:database:create | ||
php app/console doctrine:schema:create | ||
php app/console doctrine:schema:create #have to be killed manually | ||
php app/console doctrine:fixtures:load | ||
``` | ||
|
||
|
@@ -50,17 +108,23 @@ Launch development server | |
|
||
```bash | ||
php app/console server:run #localhost only | ||
php app/console server:run 0.0.0.0:9001 #available for everyone | ||
php app/console server:run 0.0.0.0 #available for everyone on port 8000 | ||
``` | ||
(you can also use the php builtin development web server : `cd web && php -S localhost:9001`) | ||
(you can also use the php builtin development web server : `cd web && php -S localhost:8000`) | ||
|
||
|
||
### Windows | ||
|
||
Deploy on shared web hosting services | ||
------------------------------------- | ||
TODO | ||
http://www.wampserver.com/ should be able to provide everything you need. | ||
|
||
|
||
## Deploy on shared web hosting services | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if it makes sense to keep this part. It has been written at a time where our website was hosted on an OVH PHP hosting where we didn't have any access to a shell.
In any case, I must warn you that even 4 years ago these scripts were not reliable to deploy. At least, if you are very nostalgic and want to keep these instructions+scripts, put an enormous disclaimer saying that this method is broken There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, thank you for your advice. We will remove that part. |
||
|
||
You can use the deploy-ftp script to deploy on a mutualised website. | ||
You must also have ncftp on your client (yum install ncftp/apt-get install ncftp) | ||
|
||
1) Configure your deployment | ||
### 1) Configure your deployment | ||
|
||
```bash | ||
cd deploy/conf | ||
|
@@ -78,7 +142,7 @@ cp parameters.yml.dist parameters.yml | |
vim parameters.yml | ||
``` | ||
|
||
2) Deploy | ||
### 2) Deploy | ||
|
||
Deploy takes approximately 5 minutes. | ||
|
||
|
@@ -87,11 +151,13 @@ cd deploy | |
./deploy-ftp.sh | ||
``` | ||
|
||
3) Remove app/cache/prod content | ||
### 3) Remove app/cache/prod content | ||
|
||
Use filezilla to clear cache, ie remove app/cache/prod folder content | ||
|
||
Backup DB before deploy, update it locally and send it after deploy if you changed the schema. | ||
|
||
4) Contributing file | ||
|
||
## Contributing | ||
|
||
If you wish to contribute to the insalan.fr project, refer to [this](https://github.com/insalan/insalan.fr/blob/master/CONTRIBUTING.md) file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you create database by this way, instead of using
php app/console doctrine:database:create
as we did before ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script was not able to connect to mariaDB since there was not a user 'insalan' in the database. Maybe because I was not logging in as 'insalan' on my test system.
I could try this week end or the next one (exams next week...)