skip manual building process

This commit is contained in:
GotPPay
2018-06-11 19:02:26 +02:00
parent c21b30d288
commit 06bea89fbc
7 changed files with 2717 additions and 2680 deletions

View File

@@ -34,14 +34,17 @@ if(APPLICATION_MODE === 'PROD'){
defined('ADMIN_MAIL') ? null : define('ADMIN_MAIL', 'dash-admin@saguaronet.ro'); defined('ADMIN_MAIL') ? null : define('ADMIN_MAIL', 'dash-admin@saguaronet.ro');
defined('DB_SERVER') ? null : define('DB_SERVER', 'db'); if (!defined('DB_SERVER')){
defined('DB_USER') ? null : define('DB_USER', 'developer'); getenv('DB_SERVER') ? define('DB_SERVER', getenv('DB_SERVER')) : define('DB_SERVER', 'db');
defined('DB_PASS') ? null : define('DB_PASS', 'developer'); }
if (!defined('DB_USER')){
if(APPLICATION_MODE === 'TEST'){ getenv('DB_USER') ? define('DB_USER', getenv('DB_USER')) : define('DB_USER', 'developer');
defined('DB_NAME') ? null : define('DB_NAME', 'ricoh_dash'); }
}else{ if (!defined('DB_PASS')){
defined('DB_NAME') ? null : define('DB_NAME', 'ricoh_dash'); getenv('DB_PASS') ? define('DB_PASS', getenv('DB_PASS')) : define('DB_PASS', 'developer');
}
if (!defined('DB_NAME')){
getenv('DB_NAME') ? define('DB_NAME', getenv('DB_NAME')) : define('DB_NAME', 'ricoh_dash');
} }
const TABLES = array( const TABLES = array(
@@ -149,6 +152,10 @@ const SUPPORT_MAIL_LIST = array(
const SESSION_LIFE_TIME = 60 * 24; const SESSION_LIFE_TIME = 60 * 24;
if (!defined('WIAAS_URL')){
getenv('WIAAS_URL') ? define('WIAAS_URL', $_ENV['WIAAS_URL']) : define('WIAAS_URL', 'http://localhost:8000');
}
const WIAAS_URL = APPLICATION_MODE === 'PROD' ? 'http://localhost:8000' : 'http://localhost:8000'; const WIAAS_URL = APPLICATION_MODE === 'PROD' ? 'http://localhost:8000' : 'http://localhost:8000';
const WORKING_DAYS_KEY = 'you@gmail.com'; const WORKING_DAYS_KEY = 'you@gmail.com';
const JWT_API_SECRET_KEY = 'W11A$_AP1_S3CR3T'; const JWT_API_SECRET_KEY = 'W11A$_AP1_S3CR3T';

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,19 @@
import processReducer from "./reducers/orders/processReducers";
const APPLICAITON_MODE = 'DEV'; const APPLICAITON_MODE = 'DEV';
const APPLICATION_NAME = 'Co-Market'; const APPLICATION_NAME = 'Co-Market';
const API_VERSION = 'v2'; const API_VERSION = 'v2';
const API_SERVER_BASE = (() => { const API_SERVER_BASE = (() => {
if(APPLICAITON_MODE === 'TEST'){ if(APPLICAITON_MODE === 'TEST'){
return 'http://localhost:8000/api-wiaas'; return process.env.TEST_URL;
} }
if(APPLICAITON_MODE === 'PROD'){ if(APPLICAITON_MODE === 'PROD'){
return 'http://localhost:8000/api-wiaas'; return process.env.PROD_URL;
} }
return 'http://localhost:8000/api-wiaas'; return 'http://localhost:8000';
})(); })();
const API_SERVER = API_SERVER_BASE + '/' + API_VERSION; const API_SERVER = API_SERVER_BASE + '/' + API_VERSION;

View File

@@ -2,9 +2,10 @@ version : '2'
services: services:
web: web:
build: ./docker/php build:
context: .
dockerfile: php.dockerfile
volumes: volumes:
- ./public:/var/www/html
- ./log/apache2/:/var/log/apache2/ - ./log/apache2/:/var/log/apache2/
ports: ports:
- '8000:80' - '8000:80'

View File

@@ -1,8 +0,0 @@
FROM php:7.0-apache
COPY apache2.conf /etc/apache2/
RUN apt-get update
RUN apt-get upgrade -y
RUN docker-php-ext-install pdo pdo_mysql mysqli
RUN a2enmod rewrite

BIN
docker/php/composer.phar Normal file

Binary file not shown.

35
php.dockerfile Normal file
View File

@@ -0,0 +1,35 @@
FROM php:7.0-apache
ENV TEST_URL=http://localhost:8000/api-wiaas \
PROD_URL=http://localhost:8000/api-wiaas \
DEV_URL=http://localhost:8000/api-wiaas
COPY docker/php/apache2.conf /etc/apache2/
COPY docker/php/composer.phar /usr/local/bin/composer
RUN chmod 755 /usr/local/bin/composer
COPY api-wiaas /home/wiaas/api-wiaas
COPY client-wiaas /home/wiaas/client-wiaas
WORKDIR /home/wiaas/api-wiaas/
RUN composer install
WORKDIR /home/wiaas
RUN cp -r api-wiaas /var/www/html/
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y gnupg
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
WORKDIR /home/wiaas/client-wiaas
RUN npm rebuild node-sass --force
RUN npm install && npm run build
RUN cp -r build/* /var/www/html/
RUN docker-php-ext-install pdo pdo_mysql mysqli
RUN a2enmod rewrite