88 lines
1.4 KiB
Markdown
88 lines
1.4 KiB
Markdown
Support WebEffector.ru
|
||
-
|
||
|
||
## CodeStyle
|
||
|
||
DataBase => kebab_style
|
||
|
||
PHP => camelCaseStyle
|
||
|
||
## Starting
|
||
|
||
#### Stack:
|
||
|
||
- php 8.1.27
|
||
- mysql 8
|
||
- Docker [docker.com](https://www.docker.com/get-started/)
|
||
|
||
#### Docker
|
||
|
||
Init:
|
||
|
||
docker-compose run --rm php ./init --env=Development --overwrite
|
||
|
||
Composer install:
|
||
|
||
docker-compose run --rm php composer install
|
||
|
||
Run Yii migrations:
|
||
|
||
Init application
|
||
|
||
docker-compose run --rm php ./yii migrate 2
|
||
|
||
Init RBAC
|
||
|
||
docker-compose run --rm php ./yii migrate 4 --migrationPath=@yii/rbac/migrations
|
||
|
||
Migrate other
|
||
|
||
docker-compose run --rm php ./yii migrate
|
||
|
||
Dump:
|
||
|
||
docker ps
|
||
|
||
docker exec -it номер_контейнера_mysql bash
|
||
|
||
mysql -u root -proot db_name < /dump/dump.sql
|
||
|
||
### Use
|
||
|
||
Hosts:
|
||
|
||
127.0.0.1 web.local
|
||
127.0.0.1 admin.web.local
|
||
|
||
Up:
|
||
|
||
docker-compose up -d
|
||
|
||
Down:
|
||
|
||
docker-compose down
|
||
|
||
ReBuild without a cache:
|
||
|
||
docker-compose build --no-cache php
|
||
|
||
Url dev:
|
||
|
||
frontend: [web.local](http://web.local)
|
||
|
||
backend: [admin.web.local](http://admin.web.local)
|
||
|
||
Url stage:
|
||
|
||
frontend: [example.webeffector.ru](https://example.webeffector.ru)
|
||
|
||
backend: [admin-example.webeffector.ru](https://admin-example.webeffector.ru)
|
||
|
||
|
||
Test data for stage/dev:
|
||
|
||
- Администратор admin@web.local:admin
|
||
- Супервайзор supervisor@web.local:supervisor
|
||
- Менеджер manager@web.local:manager
|
||
- Пользователь customer@web.local:customer
|