how-to-install-and-run.md 9.2 KB

1. How to install and run php-docker

# cd $HOME

# git clone http://git.daboryhost.com:10880/dabory/mybin

# export PATH=$PATH:$HOME/mybin

# mkdir -p $HOME/docker-works/php/

# cdphp

# git clone http://git.daboryhost.com:10880/dabory/php-docker

# cd php-docker

Read reference manual to setup docker environment

# git clone http://git.daboryhost.com:10880/dabory/dbrerp

# cd dbrerp

Read reference manual to setup dbrerp environment

2. How to Setup theme folder

dbrerp has 2 different concept for controlling source code such as "standard" part and "theme" part.

Many software solution providers have a big scourge of core solution part and customizing part to be jumbled as a spagetti syndrom. Problems related with this issue have been preventing smooth upgrade and raised update cost in software development. Dabory suggested a method to solve this problem by dividing code of "stardard" and "theme" as customized part. As dabory team build developed "double git update structure" by using .git and .gitignore functiionalities and proper folder structure. Also it have applied to User Pages( so-called Admin pages) and Pro Pages ( so-called Service Pages) in 2 different ways.

(1) THEME folder

$HOME/docker-works/php/{website-alias}/dbrerp/public/themes/ is theme forlder to be used customized part "{website-alise}" is can be "php-docker" or specific names as such as "newerp-php73" when developers maintain multiple websites in local PC. In webhosting server, /home/{website-alias}/public_html/public/themes/

As git structure, "themes" folder is excluded by adding folder name in .gitignore file.

Under "themes" folder, it can have subfolder such as "pro" and "erp" As the subfolder, "pro" is for Pro Page for consists of Service Pages (or Home Page) excluding User Pages(Admin page). Also "erp" indicates folder for User Pages(or Admin Pages) This is why "themes" folder have a sub git structure under root git struture. we call root git as "parent git" and theme git as "child git"

You can acquire folder name typing in cli : # cdpro {website-alise} example for local PC: $ cdpro newerp-php73 (will show) cd /Users/EricKim/docker-works/php/newerp-php73/dbrerp/public/themes/pro

example for server : $ cdpro newerp (will show) cd /home/newerp/public_html/public/themes/pro

example for local PC: $ cderp newerp-php73 (will show) cd /Users/EricKim/docker-works/php/newerp-php73/dbrerp/public/themes/erp

example for server : $ cdpro newerp (will show) cd /home/newerp/public_html/public/themes/erp

(2) How to install THEME folder

http://git.daboryhost.com:10880/dbr-themes-pro There are dbr-themes-pro themes to be selected for theme, choose one of them and git clone the url link. cd {themes_folder/pro}

# git clone http://git.daboryhost.com:10880/dbr-themes-pro/erponly

As same way, http://git.daboryhost.com:10880/dbr-themes-erp There are dbr-themes-erp themes to be selected for theme, choose one of them and git clone the url link.

# git clone http://git.daboryhost.com:10880/dbr-themes-erp/optical_pos

!! Important difference between "pro" and "erp" is that: pro should be one, erp can be multiple because erp can have conbined features by business logic and workflows.

(3) How to GIT sync STANDARD/THEME folder with git server simultanously

example for local PC: cd $HOME/docker-works/php/ ( normally input cdphp) all-gitpp {website-alias}

example for server :
cd /home (normally input cdz) all-gitpp-host {website-alias}

These shell scripts run git sync with standard folder and change directory to themes folder of "pro" and "erp" and run sync for both of pro and erp folder to reduce time for total updates.

(4) How to sync THEME folder and .env file variables

You can easily find ERP_THEMES, PRO_THEME variables in 2nd, 3th lines of .env file. You MUST syncronize the variable name and theme folder name as variable value.

3. How to start php-docker

# cd $HOME/docker-works/php/php-docker

# dkrmcu-remove-containers-and-compose-up

1) This will delete all docker containers and restart container in local PC.

2) You don't need to anything after update git in server.

4. How to stop php-docker (delete all docker containers)

# cd $HOME/docker-works/php/php-docker

# docker rm -f $(docker ps -a -q)

.

4. Configuration

.env Location : $HOME/.env (Laravel Env variable and Dabory variable combined)

.env.dabory Location : $HOME/.env.dabory (Dabory API Connection and Token Keys)

Note1 : There are divided concepts of ERP / PRO in dabory solution from the other web/app solutions.

ERP is for backoffice pages for company or organization staffs and managers (Extension of Admin Page)

PRO is for frontoffice pages for guest and customer member who are outside of company or organization (Extension of Service Page)

Note2 : Dabory Media Library is inspired by Wordpress media library and extened for more wide range of use.

Note3 : All of variables "Laravel" sub item can be referred in website below.

https://laravel.com/docs/7.x/configuration

Important !! : In development or web design stage, You should set .env as follows:

  1. BROWSER_CACHE=false
  2. CSSJS_URL=local

This reduces website rendering speed, but changes in js script and css are fed to web pages in no time.

.env Variable Description.

Type Name Usage Applied Remarks
Dabory ERP_PARA_CUSTOM_THEME ERP theme erp 파라 커스텀할 때 사
Dabory ERP_THEMES ERP theme Can be multiple themes
PRO_THEME PRO theme only one theme available for one site
LOCALE_SEQUENCE Language and Local Sequence Separated by comma
APP_MOBILE_NO Mobile No for Admin message
TAG_LINE Page Tag for SEO
MEDIA_URL File upload URL Local, Website and CDN such as S3 available
FAVICON_PATH Pavicon File Path
IS_SKIP_DBUPDATE Skip DB update
IS_ON_MEMBER_SIGNUP Yes
FROALA_LICENSE_KEY FROALA 라인센스 키
SHIP_TRACK_API 배송 추적 api키
DEVICE_SCALE ex)mobile>0;tablet>768;desktop>1024
API23E_KEY_PAIR api23e key pair
USER_LOGIN_ROUTE 유저로그인 페이지 주소 커스텀
ADMIN_EMAIL 테스트 메일보낼 때 받을 메일
CRM_SEARCH_SITE crm search site 이동 주소
CRM_CUSTOM crm custom 확인
CRM_KKSEARCH_URL crm kksearch site 주소
SMS SMS_TYPE aligo
SMS SMS_APIKEY sms api key
SMS SMS_USER sms user
SMS SMS_SENDER sms sender
BROWSER_CACHE Browser Cache Available
CSSJS_URL css, js asset url
VERSION_DATE css, js 캐시 업데이트
Printer REPORT_SERVER_URL Shared Report Server Crystal Report suppored
elastic ELASTIC_HOST
elastic ELASTIC_USER
elastic ELASTIC_PASSWD
elastic KIBANA_URL
Laravel APP-xxx Refer Laravel Manual site for more info https://laravel.com/docs/7.x/configuration
DB_CONNECTION Yes Dabory Does Not use Eloquent ORM in Laravel
AWS_ACCESS_XXX Dabory use S3 as media library
PUSHER_APP_ID No
LOG_CHANNEL No
MEMCACHED_HOST No
SESSION_DRIVER No
REDIS_HOST No
MAIL_MAILER Dabory use S3 as mailer in Laravel
PUSHER_APP_ID No
MIX_PUSHER_APP_KEY No