From 24b087b600b1145eb16a61cc7142128404e4a5d4 Mon Sep 17 00:00:00 2001 From: Andrew Dickinson Date: Sun, 27 Aug 2023 18:19:43 -0400 Subject: [PATCH] Improve setup experience with example values & readme tips --- .env.sample | 6 +++--- README.md | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.env.sample b/.env.sample index f40ebcfb..6451b4c4 100644 --- a/.env.sample +++ b/.env.sample @@ -1,4 +1,4 @@ -DB_NAME= -DB_USER= -DB_HOST= +DB_NAME=meshdb +DB_USER=admin +DB_HOST=127.0.0.1 DB_PASSWORD= diff --git a/README.md b/README.md index 0996e54e..fe3d71d5 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,26 @@ For more information, [check the wiki](http://wiki.mesh.nycmesh.net/books/softwa ## Setup -``` +To run a local copy from source code, first clone the package with git and create the expected +`.env` file (or otherwise configure the environment variables specified in `.env.sample` as +appropriate to your environment). +```sh git clone https://github.com/andybaumgar/nycmesh-database -docker-compose up +cp .env.sample .env +nano .env # Fill in any missing values +``` + +Finally, start the application and database servers using `docker compose` +```sh +docker compose up ``` + +After a few minutes for image download & database setup, the development server should be +available at `127.0.0.1:8080`: +```sh +# Should return "[]" since the database is empty +curl http://127.0.0.1:8080/getMembers +``` + +