From 362fbac0ff84aba80583809522385917b32904c1 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 22 Sep 2018 11:15:06 -0500 Subject: [PATCH] Update db instructions --- README.md | 5 ++++- config/dev.exs | 2 +- lib/mix/tasks/nashville_zone_lookup/ingest_land_use_table.ex | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e7aea7..1b3c74a 100644 --- a/README.md +++ b/README.md @@ -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)._ @@ -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). diff --git a/config/dev.exs b/config/dev.exs index bca106b..508094d 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -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 diff --git a/lib/mix/tasks/nashville_zone_lookup/ingest_land_use_table.ex b/lib/mix/tasks/nashville_zone_lookup/ingest_land_use_table.ex index 2a7f444..0b28868 100644 --- a/lib/mix/tasks/nashville_zone_lookup/ingest_land_use_table.ex +++ b/lib/mix/tasks/nashville_zone_lookup/ingest_land_use_table.ex @@ -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