-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
DMP Assistant is a Ruby on Rails application that requires the following:
-
Ruby
~2.6.x
-
Rails
~5
-
Bundler
~2.2.x
-
MySQL
>=5
-
PostgreSQL
>=9.2
-
Yarn
~1.22.x
-
Node.js
~12.x
for management of assets - ImageMagick used by the Dragonfly gem to manage logos
- Optional : we suggest you to use ruby AND/OR node package management application, such as rvm and nvm, for a better development environment control
You can find more details on how to install Ruby on Rails applications are available from the Ruby on Rails site.
Refer to the following documentation for installing the PostgreSQL database server and creating your first user and database. Be sure to follow the instructions for your particular environment.
- PostgreSQL documentation:
- Install: https://www.postgresql.org/download/
- Create a user: https://www.postgresql.org/docs/current/sql-createuser.html
- Create the database: https://www.postgresql.org/docs/current/sql-createdatabase.html
You may also find the following resources useful:
- The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
- Ruby on Rails Tutorial Book: http://www.railstutorial.org/
Get the latest version of DMP Assistant from integration branch:
# git init [for an empty folder]
git remote add upstream https://github.com/portagenetwork/roadmap.git
git fetch
git checkout integration
git pull upstream integration
git push origin integration
git checkout -b [my-branch]
- Create a new user called postgres using a temporary password secret_password
- Give the privilege for roadmap and test_db databases to this user
We are using secrets instead of encrypted credentials to handle sensitive information now. You can create a .env
file at the root of the project folder, then change following environmental variables based on your need:
Name | Description | Default Value |
---|---|---|
RECAPTCHA_SECRET_KEY |
api key for reCAPTCHA | |
RECAPTCHA_SITE_KEY |
api key for reCAPTCHA | |
SECRET_KEY |
for encrypting the contents of cookie-based sessions | |
SECRET_KEY_BASE |
for encrypting the contents of cookie-based sessions | |
DEVISE_SECRET_KEY |
for password encrypting | |
DEVISE_PEPPER |
for password encrypting | |
RAILS_ENV |
for rails environment setup | development |
POSTGRES_DB |
PostgreSQL database name | roadmap |
POSTGRES_USER |
PostgreSQL database user | postgres |
POSTGRES_PASSWORD |
PostgreSQL database password | secret_password |
DATABASE_URL |
PostgreSQL database url | "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1/${POSTGRES_DB}" |
DATABASE_TEST_URL |
PostgreSQL test database url | "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1/test_db" |
DRAGONFLY_SECRET |
for store data | |
TRANSLATION_IO_API_KEY |
OPTIONAL. Change this if you want to sync with translation.io. Contact support@portagenetwork.ca for detail | |
WICKED_PDF_PATH |
OPTIONAL. wkhtmltopdf needs to be installed for PDF generation/download. See https://wkhtmltopdf.org for download and setup process | /usr/local/bin/wkhtmltopdf |
- An example of minimized
.env
file to get the DMP Assistant work could looks like:
POSTGRES_DB=roadmap
POSTGRES_USER=postgres
POSTGRES_PASSWORD=secret_password
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1/${POSTGRES_DB}"
DATABASE_TEST_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1/test_db"
RECAPTCHA_SECRET_KEY=change_me
RECAPTCHA_SITE_KEY=change_me
SECRET_KEY=change_me
SECRET_KEY_BASE=change_me
We provide Docker development environment to simplify your journey of the DMP Assistant. We suggest you use the most up-to-date Docker platform for a better development experience.
In the terminal:
-
Get latest version of our docker file:
docker pull ualbertalib/dmp_roadmap:latest
-
Navigate to the dmp assistant folder that you forked, and run the database services in the background:
docker compose -f docker-compose-development.yml up -d
If you see an error said
/roadmap/.env: no such file or directory
, please create.env
file on root directory referring to Pre Installation step above. -
Install the package.json dependencies:
yarn install
-
Install the Gemfile dependencies:
bundle install
-
Apply the migrations to the database:
bin/setup
-
Start the app:
rails s
-
Verify that the site is running properly by going to http://localhost:3000 using any of the four tested accounts that is load in
seeds.rb
:Email Password super_admin@example.com password123 funder_admin@example.com password123 org_admin@example.com password123 org_user@example.com password123
We will have a new sample database coming soon for you to use. Refer the home page for latest update
- You should log in successful and see your dashboard:
Congratulations for finishing your installation! Now start your journey with DMP Assistant!
- In the terminal, navigate to the dmp assistant folder that you forked, then run
bin/setup
to initialize the project (PLEASE BACKUP your old database first if you need first)
You will see dependencies being installed, sample files being created and corresponding databases being created. Lastly, the Rails server is restarted:
-
Make sure you have npm (node package manager) installed, Then install the node dependencies by running the Webpacker rake task:
rake yarn:install
-
Once webpack is running, open a second window/tab and start the application
rails server
-
Verify that the site is running properly by going to http://localhost:3000 using any of the four tested accounts that is load in
seeds.rb
:Email Password super_admin@example.com password123 funder_admin@example.com password123 org_admin@example.com password123 org_user@example.com password123
We will have a new sample database coming soon for you to use. Refer the home page for latest update
- You should log in successful and see your dashboard:
Congratulations for finishing your installation! Now start your journey with DMP Assistant!
You should perform the following tasks prior to deploying the system on a server that is accessible to the web:
-
Delete the users included in the
seeds.rb
file (e.g.super_admin@example.com
) or at least change their passwords. You can also do a data dump if you have a SQL file ready. -
Update the site's Branding.
-
Designate/create a default template. If a user creates a plan and specifies no research organization and no funder (or a combination that results in no published templates) then their plan is created using a default template. You must define your default template in the DB by setting
templates.is_default
equal to true.
- Home
- Releases
- Development Roadmap - Under Construction
- Developer Guide
- DMP Roadmap Wiki