This repository was archived by the owner on Oct 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Install instruc #79
Closed
Closed
Install instruc #79
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,124 @@ | ||
insalan.fr | ||
========== | ||
# insalan.fr | ||
|
||
[](https://travis-ci.org/InsaLan/insalan.fr) | ||
[](https://codeclimate.com/github/InsaLan/insalan.fr/maintainability) | ||
[](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 | ||
composer.phar install | ||
sudo apt-get update && apt-get upgrade | ||
``` | ||
|
||
If not set with composer.phar, configure symfony2 : | ||
Install git and clone the repository | ||
|
||
```bash | ||
cp app/config/parameters.yml.dist app/config/parameters.yml | ||
vim app/config/parameters.yml | ||
sudo apt-get install git | ||
git clone https://github.com/InsaLan/insalan.fr | ||
``` | ||
|
||
Create database & load fixtures (php-mbstring needed) | ||
It is recommended to get `composer.phar` in your PATH : https://getcomposer.org/doc/00-intro.md | ||
|
||
Install the remaining packages | ||
|
||
```bash | ||
php app/console doctrine:database:create | ||
php app/console doctrine:schema:create | ||
php app/console doctrine:fixtures:load | ||
sudo apt-get install php php-curl php-intl php-mbstring php-mysql php-xml mariadb-server zip | ||
``` | ||
|
||
Install assets | ||
Proceed with the install and accept default settings | ||
|
||
```bash | ||
php app/console assets:install #dev | ||
php app/console assetic:dump #prod | ||
cd insalan.fr | ||
composer.phar install | ||
``` | ||
|
||
Clear cache | ||
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 | ||
php app/console cache:clear #dev | ||
php app/console cache:clear --env=prod | ||
sudo mysql -u root -p | ||
``` | ||
|
||
Launch development server | ||
Create database, user and grant access | ||
|
||
```bash | ||
php app/console server:run #localhost only | ||
php app/console server:run 0.0.0.0:9001 #available for everyone | ||
```mariadb | ||
CREATE DATABASE insalan; | ||
CREATE USER insalan@'localhost'; | ||
GRANT ALL PRIVILEGES ON insalan.* to insalan@'localhost'; | ||
``` | ||
(you can also use the php builtin development web server : `cd web && php -S localhost:9001`) | ||
|
||
Deploy on shared web hosting services | ||
------------------------------------- | ||
|
||
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) | ||
#### Fill database and run | ||
|
||
1) Configure your deployment | ||
Load fixtures (php-mbstring needed) | ||
|
||
```bash | ||
cd deploy/conf | ||
|
||
#Configure ftp | ||
cp ftp.cfg.dist ftp.cfg | ||
vim ftp.cfg | ||
php app/console doctrine:schema:create #have to be killed manually | ||
php app/console doctrine:fixtures:load | ||
``` | ||
|
||
#Configure .htaccess | ||
cp .htaccess.dist .htaccess | ||
vim .htaccess | ||
Install assets | ||
|
||
#Configure parameters.yml | ||
cp parameters.yml.dist parameters.yml | ||
vim parameters.yml | ||
```bash | ||
php app/console assets:install #dev | ||
php app/console assetic:dump #prod | ||
``` | ||
|
||
2) Deploy | ||
Clear cache | ||
|
||
```bash | ||
php app/console cache:clear #dev | ||
php app/console cache:clear --env=prod | ||
``` | ||
|
||
Deploy takes approximately 5 minutes. | ||
Launch development server | ||
|
||
```bash | ||
cd deploy | ||
./deploy-ftp.sh | ||
php app/console server:run #localhost only | ||
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:8000`) | ||
|
||
|
||
### Windows | ||
|
||
3) Remove app/cache/prod content | ||
Use filezilla to clear cache, ie remove app/cache/prod folder content | ||
TODO | ||
http://www.wampserver.com/ should be able to provide everything you need. | ||
|
||
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. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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...)