This is a database to track reïmbursements and miscellania for a prison rideshare project. It serves the API for the Ember UI.
It’s intended to replace an increasingly unwieldy and brittle set of spreadsheets.
The initial target feature set will cover:
- coördinators recording ride requests
- ride-givers completing reports on their rides
- collecting and calculating gas and food expenses from the reports
- tracking reïmbursements of expenses
It’s currently specific to Bar None’s prison rideshare project but if you’re interested in adapting it, please let us know, we are interested in making it useful for others!
This can be deployed to various environments but Dokku is the current iteration.
dokku apps:create rideshare-api
dokku buildpacks:add rideshare-api https://github.com/gigalixir/gigalixir-buildpack-elixir.git
dokku postgres:create rideshare-api
dokku postgres:link rideshare-api rideshare-api
DATABASE_URL
(set automatically bypostgres:link
)GAS_PRICE_ENDPOINT
: fetched to determine daily gas pricesGUARDIAN_SECRET
,PERSON_GUARDIAN_SECRET
: usemix phx.gen.secret
to generateMAILGUN_DOMAIN
,MAILGUN_KEY
: to send transactional email (ride reports, calendar links, warnings)ORIGIN_HOST
: domain application will be served atSECRET_KEY_BASE
: usemix phx.gen.secret
to generateSENTRY_DSN
: for error-monitoring
dokku config:set rideshare-api \
GAS_PRICE_ENDPOINT= \
GUARDIAN_SECRET= \
MAILGUN_DOMAIN= \
MAILGUN_KEY= \
ORIGIN_HOST= \
PERSON_GUARDIAN_SECRET= \
SECRET_KEY_BASE= \
SENTRY_DSN=
Currently hardcoded:
- currency
git remote add [remote name] dokku@[host]:rideshare-api
git push [remote name] primary
To start your Phoenix app:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- Install Node.js dependencies with
npm install
- Start Phoenix endpoint with
mix phoenix.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: http://www.phoenixframework.org/
- Guides: http://phoenixframework.org/docs/overview
- Docs: https://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix