The Readme is still a work in progress. It actually won't get you very far, because there's a lot of seed data you need to get going, and I don't have that in a useful format right now. So if you're trying to setup Dulu for whatever reason, let me know so I can help you out.
- Ruby - We're using rbenv and ruby 2.3.3.
- PostGreSQL
-
Clone the repo.
git clone https://github.com/silcam/dulu.git
-
Create databases dulu_dev and dulu_test. See database.yml for the username and password to use.
rails db:create
Note: if you also need to drop the db, you can first run
rails db:drop (if necessary)
-
Install bundler if you don't already have it
gem install bundler
-
Install the necessary gems
bundle install
-
yarn install
yarn install
If you don't have it, install yarn first.
-
Initialize the development database by loading the schema
rails db:schema:load
If you just want to run the tests, you can after a few more steps. The test database does not need to be seeded.
-
In
secrets.yml, add Rails.application.secrets.smtp_username, set to something fake. (previously gmail_username, which is deprecated) -
Run tests.
See the definitions in
package.jsonabout the different testing options. For example, you can runyarn test:mostto run the rails units and the jest tests.
If you want to start the server to run this in a web browser, you need a few more steps.
-
You need to set up an omni auth config in
./config/initializers/omniauth.rb. You can see the Omniauth documentation for how to do this. -
You need to seed the database.
rails db:seed RAILS_ENV=development
This will insert some default data and create an admin user for you. Use one of your Google accounts.
-
Start the Server
foreman s
-
Access Dulu at http://localhost:3000