-
Notifications
You must be signed in to change notification settings - Fork 14
Installation Guide
This guide will help you configure and run cdms locally on your computer.
Firstly install the following applications:
Note: Commands started with $ are executed on terminal without super user (sudo).
Use the commands below to create and access the new folder:
$ mkdir workspace
$ cd workspace
Note: If you intend to contribute to this project, consider follow Setup your Repository guide. If your intent is just run the application, follow the steps below.
If you have ssh set up with git, to clone the cdms project run:
$ git clone git@github.com:MarczalTSIGP/cdms.git
otherwise
$ git clone https://github.com/MarczalTSIGP/cdms.git
Access the cdms folder:
$ cd cdms
Note: If you have Ruby installed locally, you may see the following message bellow at this point. However, since the application will run in containers, you do not need to worry about this warning. You can simply ignore it and continue with the installation guide.
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /home/linux/workspace/cdms/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
Unknown ruby interpreter version (do not know how to handle): ~>3.2.
Before you continue, make sure the Docker is running.
If you are on Mac OS or WLS2:
$ docker build .
If you are on Linux:
$ docker build --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .
Note: The command above ensures that the user who builds the container has the same user and group IDs as the user who is building the image.
Create a file "application.yml" using the example "application.yml.example":
$ cp config/application.yml.example config/application.yml
If necessary, change username, password and host from database settings.
By default, it will work with no changes.
In this project is used the mailtrap.io to send emails.
In "config/application.yml" is necessary setup your USERNAME and PASSWORD with your personal mailtrap account data.
mailer.from: 'email@email.com'
mailer.smtp: 'smtp.mailtrap.io'
mailer.smtp.port: '2525'
mailer.smtp.domain: 'smtp.mailtrap.io'
mailer.smtp.username: 'USERNAME'
mailer.smtp.password: 'PASSWORD'
mailer.smtp.authentication: 'cram_md5'
Ruby Gems: To download and install ruby gems dependencies run:
$ docker compose run --rm web bundle install
Yarn: To download and install node dependencies run:
$ docker compose run --rm web yarn install
To create the cdms database run:
$ docker compose run --rm web bundle exec rails db:create
To create the tables schema on cdms database run:
$ docker compose run --rm web bundle exec rails db:migrate
To populate the application with required and defaults values:
$ docker compose run --rm web bundle exec rails db:seed
$ docker compose up -d web
In your browser access localhost through the port :3000
To finish this installation guide, perform a login on the application using the following credentials:
username: admin@utfpr.edu.br
password: 123456
If all work's as expected, you should be redirected to application Dashboard.
To improve your knowledge about the application we strongly recommend you to read the Tips and Hints.
If you are interest to contribute for this project, please access Contribute to the App.