Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

Update db instructions #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To build and run this app locally:
- Run the frontend's HTTP server `npm run dev`.
- Run the database in the background with `docker run -p 5432:5432 --name nashville_zone_lookup_dev -d postgres:9.6`.
- Create and migrate your database with `mix ecto.setup && mix ecto.migrate`
- Optionally run the [Postgres shell](https://www.postgresql.org/docs/current/static/app-psql.html) with `docker exec -it nashville_zone_lookup_db psql -U postgres nashville_zone_lookup_dev`
- Optionally run the [Postgres shell](https://www.postgresql.org/docs/current/static/app-psql.html) with `docker exec -it nashville_zone_lookup_dev psql -U postgres nashville_zone_lookup_db`

_Note: Additional commands are available for the frontend app and are documented in its [README](frontend)._

Expand Down Expand Up @@ -57,6 +57,9 @@ To test the frontend:
## Heroku Deployment
This repository is configured to deploy master automatically to Heroku via Travis CI.

### Env Variables
`DATABASE_URL="ecto://postgres:postgres@localhost/nashville_zone_lookup_db"`

## Planning
- For a detailed description of the project, check out the [Request for Volunteers](https://docs.google.com/document/d/17DNk0QQyi8SEK4utcMt3zT-Dc6vXzA_zcFwrEENvKJo/edit?usp=sharing).
- For other shared documents, check out [Google Drive](https://drive.google.com/drive/folders/0Byi0NApRjhBXekRiVFA5MlZ2OTQ?usp=sharing).
Expand Down
2 changes: 1 addition & 1 deletion config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ config :nashville_zone_lookup, NashvilleZoneLookup.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "nashville_zone_lookup_dev",
database: "nashville_zone_lookup_db",
hostname: "localhost",
pool_size: 10
3 changes: 3 additions & 0 deletions lib/mix/tasks/nashville_zone_lookup/ingest_land_use_table.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ defmodule Mix.Tasks.NashvilleZoneLookup.IngestLandUseTable do
https://docs.google.com/spreadsheets/d/1O0Qc8nErSbstCiWpbpRQ0tPMS0NukCmcov2-s_u8Umg/
This spreadsheet has a peculiar format described in detail in the source code
of this task.

Assuming the spreadsheet was saved as `data.csv` in the root of this project, the command to
injest it is `mix nashville_zone_lookup.ingest_land_use_table ./data.csv`.
"""

use Mix.Task
Expand Down