caisse-bliss/docs/installation.md

53 lines
1.8 KiB
Markdown
Raw Normal View History

2019-05-11 14:56:58 +02:00
# Requirements:
a web server speaking PHP, composer and NPM to install dependencies.
2019-05-11 15:21:13 +02:00
I develop on [Ubuntu](https://ubuntu.org), so here are the steps i recommend:
2019-05-11 14:56:58 +02:00
2019-05-11 15:09:11 +02:00
## Install [Composer](https://getcomposer.org/download/) via PHP command
2019-05-11 15:21:13 +02:00
Composer manages dependencies of a lot of php projects. Try these commands or refer to [the download docs of getcomposer.org](https://getcomposer.org/download/)
2019-05-11 15:09:11 +02:00
```
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
2019-05-11 15:21:13 +02:00
composer install
2019-05-11 15:09:11 +02:00
```
2019-05-11 14:56:58 +02:00
# Installation:
2019-05-11 15:21:13 +02:00
When you have satisfied all the previous requirements you can install dependencies with [the bash script](/install.sh):
2019-05-11 14:56:58 +02:00
```bash
bash install.sh
```
2019-05-11 15:09:11 +02:00
## Configure your app parameters
2019-05-11 15:21:13 +02:00
In the [paramters.yml](/app/config/parameters.yml) file, setup your database access (create your DB if necessary). Works with mysql and others via the magic of Doctrine ORM.
```yaml
database_host: 127.0.0.1
database_port: null
database_name: symfony
database_user: YOURDATABASEUSER
database_password: YOURDATABASEPASSWORD
```
2019-05-11 15:09:11 +02:00
update schema with doctrine in the command line.
2019-05-11 14:56:58 +02:00
```bash
php bin/console doctrine:schema:update --dump-sql
php bin/console doctrine:schema:update --force
```
compile front end assets
```bash
yarn run encore dev --watch
```
access the front with your browser
```bash
php bin/console server:run
firefox http://http://127.0.0.1:8000/
```
enjoy!
2019-05-11 15:21:13 +02:00
#install via Docker ?
I didn't do that for the moment, but you can contribute to this if you like to.