Skip to content

Commit

Permalink
Add more information in README
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-hank committed Jan 26, 2023
1 parent 3cf5804 commit b2a3020
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 8 deletions.
5 changes: 0 additions & 5 deletions README

This file was deleted.

46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Time Tracker

Time Tracker is a simple open-source time reporting application.

## Stack
* Ruby `3.0.x`
* Ruby on Rails `7.0.x`
* PostgreSQL `9.x` - `14.x`
* Bundler
* Yarn

## Development

* `docker-composer up`
* `docker-compose exec website bash`
* `bundle install`
* Copy `config/database.yml.example` to `config/database.yml` and set up your database accordingly.
* Copy `config/secrets.yml.example` to `config/secrets.yml` and fill in the `secret_key_base` values for dev/test.
* Add the following to .env:
* `USE_FAKEAUTH` (optional; set to to `true` if you want to bypass CAS for development; any username/password will work; cannot be used in production).
* `SECRET_KEY_BASE` (required in production, optional otherwise; use `rails secret` to generate a value).
* `ALLOWED_HOST` (localhost is allowed by default; anything else must be explicit; may be a single string or a regex)
* `CAS_DATA_DIRECTORY` (required in production, directory for storing CAS data, in development use `USE_FAKEAUTH`)
* `rails db:migrate`
* `rails s -b 0.0.0.0`

## Deployment

* The first time
* Follow the steps above for development.
* Make sure you've set the server hostname in ALLOWED_HOST.
* Every time
* `git pull`
* `bundle install`
* `yarn install`
* `rails assets:clobber && rails assets:precompile` if assets changes
* `rails db:migrate` if db schema changes.
* Run your web server, whatever it is (e.g. https://github.com/phusion/passenger).

## License

This application is released under a GPLv3 license.

## Copyright

2012-2023 President and Fellows of Harvard College
7 changes: 4 additions & 3 deletions config/database.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
development:
adapter: postgresql
encoding: unicode
database: timetracker_development
host: postgres
database: time
pool: 5
username: djcp
password:
username: postgres
password: so_wow

# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
Expand Down
8 changes: 8 additions & 0 deletions config/secrets.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
development:
secret_key_base:

test:
secret_key_base:

production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

0 comments on commit b2a3020

Please sign in to comment.