Skip to content

Commit

Permalink
updated readme and fixed an error in core.php
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalthaheem committed Feb 15, 2019
1 parent 85cec10 commit fe9423d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM php:5.6.40-apache-stretch

LABEL maintainer="Faisal Thaheem" BASENAME="dvs"
LABEL maintainer="Faisal Thaheem" BASENAME="faisalthaheem/dvs"

ADD ./conf/000-default.conf /etc/apache2/sites-enabled/
#copy to temp and move later in below statement to make
Expand Down
33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
For support cases please open tickets using the "issues" tab on the top.

# Trying it out
Quickest way to try out the script is using docker, after you have installed docker do the following

git clone https://github.com/faisalthaheem/denovo-voucher-script.git
cd denovo-voucher-script
docker-compose up

The above will take care of file permissions, database setup as well as starting a phpmyadmin instance on http://localhost:8081

You can browse the site at http://localhost:8080 and access the administrative backend at http://localhost:8080/admin using the default username and passsword "admin@voucherscript.com" and "admin"

# [DVS] Denovo Voucher Script
Denovo Voucher Script (DVS) is an affiliate marketing tool you can install on your domain to market affiliated products/promotions/offers etc. as well as distribute vouchers to your visitors through the tool.

Expand Down Expand Up @@ -38,26 +49,12 @@ sendmail|yes
php safe mode|off
php_memory_limit| >128M

# Trying it out
Quickest way to try out the script is using docker, build the image from the Dockerfile which contains the runtime environment only in "docker-dev" folder and run it

git clone https://github.com/faisalthaheem/denovo-voucher-script.git
cd denovo-voucher-script
cd docker-dev
build.bat
run.bat "c:/somelocation/denovo-voucher-script/site"

**To setup DB, execute the following sql script files after connecting to the mysql instance in the docker container on localhost**
# Setup manually

See ["Connecting to the bundled MySQL server from outside the container"](https://hub.docker.com/r/peterwilli/lamp-with-php5/) for instructions on finding the username/password
Copy the content of the "site" folder to /var/www/html (assuming that is your web root) and remember to change the ownership recursively to www-data.www-data/

```
/app/config/schema/db.sql
/app/config/schema/adility.sql
/app/config/schema/affilinet.sql
/app/config/schema/icodesuk.sql
/app/config/schema/icodesus.sql
```
To setup DB, import all the .sql files inside site/app/config/schema/sql
For details related to database setup, please refer to database.php under site/app/config

# Demo videos
[Goto demo index page](https://github.com/faisalthaheem/denovo-voucher-script/wiki/Demo-Video-Index)
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
volumes:
- /sessions
dvs:
image: dvs:1.0
image: faisalthaheem/dvs:latest
ports:
- "8080:80"
networks:
Expand Down
4 changes: 3 additions & 1 deletion site/app/config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/

$debug = getenv('DEBUG');
printf("DEBUG set to %s", $debug);
$log_debug = sprintf("[DEBUG=%s] ", $debug);
file_put_contents('php://stderr', $log_debug);
Configure::write('debug', (int)$debug);

/**
Expand Down

0 comments on commit fe9423d

Please sign in to comment.