-
Code recovery
-
Git
Connect with SSH key to your server.
Use the command :git clone https://github.com/MalronWall/OC_Fo-Back_P7.git
-
FTP
Download this repository.
Use a FTP client, for example FileZilla and connect to the server.
Use the FTP client to transfert the repository on your server.
-
-
Configuration
Update environnements variables in the /app/config/parameters.yml file with your values. At the very least you need to define the SYMFONY_ENV=prod
-
Vendors installation
-
Composer
If you can use Composer in your server, use
composer install --no-dev -ao
for optimized installation of vendors.
If you can't use Composer, download Composer.phar and usephp composer.phar install --no-dev -ao
. -
FTP
If you can't use the both solutions, use your FTP client to download all vendors.
This solution is to be used only if no solution with Composer works.
-
-
Assets install
Run the command
php app/console assets:install --symlink --relative
to copy assets in your web/ folder. -
Database creation
Use the command
php bin/console d:d:c
for database creation.
Use the commandphp bin/console d:m:m
for creation of the tables.
Create the first Client manually in the database with this command :
INSERT INTO 'client' ('id', 'username', 'password', 'roles')
VALUES ('[A valid UUID]', 'Admin', '[A password encoded in bcrypt]', 'a:1:{i:0;s:10:\"ROLE_ADMIN\";}');
-
Documentation and API tests
The documentation is on the uri
/api/doc
. If the uri is/
, user redirected to/api/doc
.
For the connection, use Postman (or other API Development Environment), and connect to the path/api/login
, with credentials :{'username': 'Admin','password': '[the previously entered password in db]'}
Copy the returned bearer token and connect by paste the token in the "Authorization" button then choose the Bearer Token security and enter your token.