@@ -22,11 +22,13 @@ along with portalmec. If not, see <http://www.gnu.org/licenses/>.
## Requirements
* ruby >=2.2
* rvm
* Dspace server
* Using rvm you will install ruby "2.3.1"
* ruby "2.3.1"
* Dspace server "5.x"
* Postgres >=9.4
* Elasticsearch
* If you will install Dspace, it is indicated to use Postgres "9.4"
* Elasticsearch "5.4"
* Redis
## Setup
...
...
@@ -38,15 +40,41 @@ After this setup, open the config files and update some vars:
* config/sidekiq.yml: change your redis hosts and ports.
* config/initializers/gitlab.rb: change your gitlab host for bug reports and set env var with private token. ( $ export GITLAB_PORTALMEC_PRIVATE_TOKEN=131237128937128937 )
## Install
After installed the requeriments, first you will need run:
*``` bundle install ```
This command will install all gems necessaries for the project. Sometimes some gems give errors, because maybe you do not have the libraries necessaries for the installation.
After do bundle install and completed the setup elements, it is necessarie create the database. For that, will run the commands in order:
*``` rake db:create ```
*``` rake db:migrate ```
* If you have a dump for the database, you need to use it before you use this command.
This procedure will create and configure all table in the project database
For the search mechanism works is necessarie to copy ``` your_directory_path/portalmec/calculate_score.painless ``` to ``` /etc/elasticsearch/scripts ```. Afther do this,
go on portalmec directory and execute ``` rake searchkick:reindex:all ```.
### Development environment
#### Using docker for development env
You can use docker for your development environment. For that, run:
``` ./bin/docker-setup ```
You can use docker for your development environment. For that, run:
./bin/docker-setup
Now, redis, elasticsearch and postgres are running as services and linked to PortalMEC application. Database migrations were execute and the configs (database.yml, sidekiq.yml was replaced by config/docker/...).
If all development and test vars are set, run:
``` ./bin/setup ```
```rake db:create```
This command will install the rubygems, create/reset your database schema, seed some default data and import all dspace data.
After this, your application is ready to use and you can access it with: