Skip to content

Latest commit

 

History

History
108 lines (87 loc) · 2.88 KB

README_DEV.md

File metadata and controls

108 lines (87 loc) · 2.88 KB

komtet_kassa_woocommerce

Запуск проекта

  • Склонируйте репозиторий включая подмодули для подтягивания SDK - git clone --recurse-submodules
  • Скачать установщик WordPress - https://wordpress.org/download/
  • Cоздать в корневом каталоге папку php
  • Распаковать архив WP CMS в папку php
  • Добавить файл .htaccess в папку php со следующим содержимым:
<FilesMatch "\.md5$">
    Deny from all
</FilesMatch>

DirectoryIndex index.php
Options -Indexes
# Comment the following line, if option Multiviews not allowed here
Options -MultiViews

AddDefaultCharset utf-8

<ifModule mod_rewrite.c>
    RewriteEngine On
    
    # Uncomment the following line, if you are having trouble
    #RewriteBase /

    # if request js file from ROOT
    RewriteCond %{REQUEST_URI} ^\/?[^\/]+\.js$ [or]
    # or if NOT request certain static file from anywhere
    RewriteCond %{REQUEST_URI} !\.(js|css|jpg|jpeg|gif|png|svg|ttf|eot|otf|woff|woff2)$ [or]
    # or if request apple-touch-icon.png icon
    RewriteCond %{REQUEST_URI} apple-touch-icon\.png$ [or]

    # or if other conditions for webdav and caldav are passed
    RewriteCond %{REQUEST_METHOD} ^(POST|PUT|COPY|MOVE|DELETE|PROPFIND|OPTIONS|MKCOL)$ [or]
    RewriteCond %{HTTP:Translate} ^.+$ [or]
    RewriteCond %{HTTP_USER_AGENT} ^(DavClnt|litmus|gvfs|davfs|wdfs|WebDAV|cadaver|Cyberduck)

    # or if file doesnt' exist
    RewriteCond %{REQUEST_FILENAME} !-f
    # or if directory doesnt' exist
    RewriteCond %{REQUEST_FILENAME} !-d

    # dispatch it to index.php
    RewriteRule ^(.*)$ index.php [L,QSA]
</ifModule>

<ifModule mod_headers.c>
    <FilesMatch "\.(jpg|jpeg|png|gif|js|css|svg|ttf|eot|otf|woff|woff2)$">
        Header set Cache-Control "max-age=3153600, public"
    </FilesMatch>
</ifModule>

php_value date.timezone 'Europe/Moscow
  • Запустить сборку проекта
make build

Установка CMS

  • Запустить контейнер
make start_web7
  • Проект будет доступен по адресу: localhost:8110;
  • Настройки подключения к бд MySQL:
Сервер: mysql
Пользователь: devuser
Пароль: devpass
БД: test_db
  • Перейдите в плагины и поставьте из маркета плагин WooCommerce

Доступные комманды из Makefile

  • Собрать проект
make build
  • Запустить проект на php5.6
make start_web5
  • Запустить проект на php7.2
make start_web7
  • Остановить проект
make stop
  • Установить/Обновить модуль в cms
make update
  • Собрать архив для установки
make release