introduce docker - changed config files to work with docker

This commit is contained in:
GotPPay
2018-06-11 11:49:39 +02:00
parent ed7df7b11f
commit c21b30d288
11 changed files with 6626 additions and 3997 deletions

View File

@@ -12,13 +12,13 @@
- install wamp or LAMP depending on the envirorment (or any other service that provides php + mysql)
Make sure that "rewrite" is allowed and enabled in APACHE server
- create /public folder and configure apache to serve this folder as root folder
- create `public` folder (in root of the project) and configure apache to serve this folder as root folder
- install composer
-run `php composer install` in api-wiaas folder to get required libraries
-run `php composer install` (or just `composer install` if composer is installed globally) in api-wiaas folder to get required libraries
- create symlink to for /api-wiaas in /public directory
- create symlink to for `api-wiaas` in `public` directory
-for old interface run `grunt` in api-wiaas to generated stylesheets
@@ -26,10 +26,28 @@
## APPLICATION CLIENT
JavasScript (React + Redux)
- npm install in client-wiaas to update required libraries
- npm install in `client-wiaas` to update required libraries
- npm run build
- copy content of build folder to /public directory
- copy content of `build` folder to `public` directory
- npm start in client-wiaas to start the applicaiton
##DOCKER
- Please note : using api-wiaas symlink is now not possible when using docker, so it has to be changed to real directory. This means on every change in source code, it has to be copied. This can be solved using file watchers. Also, if code in client-wiaas is changed, it has to be rebuilt and contents of client-wiaas/build directory needs to be copied over to public directory.
- Two files have to be changed : api-wiaas/config.php and client-wiaas/src/config.js, as follows :
config.php
DB_SERVER = db
WIAAS_URL = http://localhost:8000
config.js
set URLs to http://localhost:8000
- install docker-ce and docker-compose
- from root of the project, execute `docker-compose build` and then `docker-compose up`
Application is now available on http://localhost:8000