Readme changes

This commit is contained in:
Almira Krdzic
2018-07-30 09:00:38 +02:00
parent e91e2d8a93
commit df1b42bb1e

View File

@@ -14,11 +14,10 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
1) Copy environment.env file and rename it to .env 1) Copy environment.env file and rename it to .env
```
cp environment.env .env cp environment.env .env
```
2) Edit .env file and add needed information 2) Edit .env file and add needed information
* `MYSQL_ROOT_PASSWORD` - MySQL database root password for MySQL docker image * `MYSQL_ROOT_PASSWORD` - MySQL database root password for MySQL docker image
* `MYSQL_DATABASE` - Wordpress database name * `MYSQL_DATABASE` - Wordpress database name
* `MYSQL_USER` - Wordpress database user * `MYSQL_USER` - Wordpress database user
@@ -30,10 +29,8 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
3) Execute in the root of the project : 3) Execute in the root of the project :
```sh
sudo docker-compose build sudo docker-compose build
sudo docker-compose up sudo docker-compose up
```
Frontend is running on http://localhost:8080 and backend on http://localhost:8081 Frontend is running on http://localhost:8080 and backend on http://localhost:8081
@@ -46,11 +43,9 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
1) Create MYSQL database / user 1) Create MYSQL database / user
```sql
CREATE DATABASE ${MYSQL_DATABASE}; CREATE DATABASE ${MYSQL_DATABASE};
CREATE USER '${MYSQL_USER}'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD}'; CREATE USER '${MYSQL_USER}'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD}';
GRANT ALL PRIVILEGES ON ${MYSQL_DATABASE}.* TO '${MYSQL_USER}'@localhost; GRANT ALL PRIVILEGES ON ${MYSQL_DATABASE}.* TO '${MYSQL_USER}'@localhost;
```
2) Seed database with `new-wiaas/database/clean-dump.sql` 2) Seed database with `new-wiaas/database/clean-dump.sql`
@@ -61,9 +56,8 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
For handling environment variables during local development we use `dotenv` library which will load all variables from `local.env` file For handling environment variables during local development we use `dotenv` library which will load all variables from `local.env` file
if such file is present. These variables will then be accessible inside wordpress. if such file is present. These variables will then be accessible inside wordpress.
```
cp environment.env local.env cp environment.env local.env
```
Update `local.env` with your local environment variables. Update `local.env` with your local environment variables.
2) Apache 2) Apache
@@ -75,11 +69,9 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
Run setup commands to install wordpress and required plugins with composer: Run setup commands to install wordpress and required plugins with composer:
```sh
cd backend cd backend
composer install composer install
composer update-db composer update-db
```
@@ -87,15 +79,14 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
1) Install dependencies 1) Install dependencies
```sh
cd frontend cd frontend
npm install npm install
```
2) Start local server 2) Start local server
```sh
cd frontend cd frontend
npm start npm start
```
## Contribution ## Contribution
@@ -105,7 +96,7 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
Project structure is inspired with [Roots Bedrock structure](https://roots.io/bedrock/). Project structure is inspired with [Roots Bedrock structure](https://roots.io/bedrock/).
```
├── composer.json # → Manage versions of WordPress, plugins & dependencies ├── composer.json # → Manage versions of WordPress, plugins & dependencies
├── config # → WordPress configuration files ├── config # → WordPress configuration files
│ ├── application.php # → Primary WP config file (wp-config.php equivalent) │ ├── application.php # → Primary WP config file (wp-config.php equivalent)
@@ -123,7 +114,7 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
├── wp-config.php # → Required by WP (never edit) ├── wp-config.php # → Required by WP (never edit)
├── index.php # → WordPress view bootstrapper ├── index.php # → WordPress view bootstrapper
└── wp # → WordPress core (never edit) └── wp # → WordPress core (never edit)
```
This approach enables: This approach enables:
- Better folder structure (wordpress core is in separate folder and is treated as dependency) - Better folder structure (wordpress core is in separate folder and is treated as dependency)