Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-hank committed Feb 13, 2024
1 parent 353a778 commit a6803be
Showing 1 changed file with 2 additions and 61 deletions.
63 changes: 2 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,9 @@

TimeTracker is a simple open-source time reporting application.

## Stack
* Ruby
* Ruby on Rails
* PostgreSQL
* Vue
* Vite
* Bundler
## Documentation

## Development

* `docker-compose -f docker-compose.dev.yml --env-file .env.dev up`
* `docker-compose -f docker-compose.dev.yml --env-file .env.dev exec app bash`
* `bundle install`
* `cd front`
* `./deploy.sh`
* `cd ..`
* `rails db:migrate`
* `rails s -b 0.0.0.0`
* Open `http://127.0.0.1:6868`.

## Deployment

* The first time
* Follow the steps above for development.
* Every time
* `git pull`
* `bundle install`
* `rails assets:clobber && rails assets:precompile` if assets changes
* `rails db:migrate` if db schema changes.
* `cd front && ./deploy.sh` if you had changes in the Vue application
* Run your web server, whatever it is (e.g. https://github.com/phusion/passenger) in the `production` environment (RAILS_ENV=production).

## Environment variables

### API (.env)

| Variable | Description | Required |
| ----------- | ----------- | -------- |
| `SECRET_KEY_BASE` | Use `rails secret` to generate a value | `Yes` |
| `FRONT_URL` | Application URL | `Yes` |
| `DATABASE_USERNAME` | Database username | `Yes` |
| `DATABASE_PASSWORD` | Database password | `Yes` |
| `DATABASE_DB_NAME` | Database name | `Yes` |
| `DATABASE_HOST` | Database host | `Yes` |
| `DATABASE_PORT` | Database port, default `5432` | `No` |
| `DATABASE_TIMEOUT` | Database timeout, default `5000 ms` | `No` |
| `ALLOWED_HOST` | `localhost` is allowed by default, anything else must be explicit, may be a single string or a regex | `No` |
| `CORS_ALLOWED_ORIGINS` | Comma-separated list of CORS allowed origins | `No`
| `DEVISE_AUTH_TYPE` | Authentication type, allowed values are `db` and `cas`, default is `db` | `No` |
| `DEVISE_CAS_AUTH_URL` | CAS server URL | `Yes` when `DEVISE_AUTH_TYPE` is `cas`, optional otherwise |
| `DEVISE_CAS_AUTH_SERVICE_PATH` | CAS callback service path, use it only if you want to customize the path, usually not needed | `No` |
| `DEFAULT_SENDER` | Application emails sender e.g. `Tony Hawk <tony@example.com>` | `Yes` when `DEVISE_AUTH_TYPE` is `db`, optional otherwise |
| `RETURN_PATH` | Email address for bounced messages | `Yes` when `DEVISE_AUTH_TYPE` is `db`, optional otherwise |

### Front-end (front/.env)

| Variable | Description | Required |
| ----------- | ----------- | -------- |
| `VITE_API_URL` | URL of the Rails API, in `development` it will most likely be `http://127.0.0.1:6868` | `Yes` |
| `VITE_SITE_URL` | URL of the Vue application, in `development` it will most likely be `http://127.0.0.1:6767` | `Yes` |
| `VITE_ENVIRONMENT` | Vue application environment, default is `development` | `No` |
| `VITE_AUTH_TYPE` | Authentication type, default is `db`, set to `cas` if you want to use CAS authentication | `No` |
https://cyber.harvard.edu/team/timetracker/docs/index.html

## License

Expand Down

0 comments on commit a6803be

Please sign in to comment.