-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/vendor/ | ||
composer.lock | ||
docker_env/php** | ||
docker_env/data** | ||
composer.phar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM php:5.6.38-apache | ||
RUN a2enmod rewrite | ||
RUN docker-php-ext-install mysqli | ||
|
||
RUN apt-get update && apt-get install -y zlib1g-dev libpng-dev libjpeg62-turbo-dev | ||
|
||
RUN docker-php-ext-install zip | ||
RUN docker-php-ext-install gd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
komtet_kassa_diafan | ||
=============================== | ||
|
||
Чтобы развернуть окружение и потестировать плагин в docker контейнере: | ||
1. создать в дирректории docker_env папку php, скопировать в нее текущий код CMS Shop-Script | ||
2. создать в дирректории docker_env папку data для хранения данных БД | ||
3. выполнить docker-compose up -d | ||
4. перейти в браузере на localhost:8100 и выполнить установку CMS, пропусть создание тестовых данных | ||
5. установить и настроить плагин через инсталлер | ||
|
||
Чтобы сделать релиз | ||
1. Установить composer. Выполнить команду php composer.phar install , создастся папка /vendor | ||
2. Запусть скрипт release.sh <версия>, в паке dist cоздастся zip архив с новой версией |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: '3' | ||
|
||
services: | ||
db: | ||
image: mysql:5.7 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: my_secret_pw_shh | ||
MYSQL_DATABASE: test_db | ||
MYSQL_USER: devuser | ||
MYSQL_PASSWORD: devpass | ||
volumes: | ||
- ./data/mysql:/var/lib/mysql | ||
ports: | ||
- "9906:3306" | ||
web: | ||
image: diafan_web:last | ||
build: ./ | ||
container_name: php_web | ||
depends_on: | ||
- db | ||
volumes: | ||
- ./php/:/var/www/html/ | ||
ports: | ||
- "8100:80" | ||
links: | ||
- db:mysql | ||
stdin_open: true | ||
tty: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
class Shop_inc_order extends Diafan | ||
{ | ||
after public function set_status ($order, $status) | ||
{ | ||
<?php | ||
|
||
class Shop_inc_order extends Diafan { | ||
after public function set_status ($order, $status) { | ||
$this->diafan->_komtetkassa->print_check($order['id']); | ||
} | ||
} |