From 567b2bba277ea947fa5efa1f7ee0768b7016fa6e Mon Sep 17 00:00:00 2001 From: Dessa Simpson Date: Mon, 6 Jul 2020 22:02:28 -0700 Subject: [PATCH] Make demo-ready - Add README.md - Add DB test data - Add port forward to docker-compose to allow the app to be accessed on Macs --- README.md | 19 +++++++++++++++++++ db/testdata.sql | 5 +++++ docker-compose.yml | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 README.md create mode 100644 db/testdata.sql diff --git a/README.md b/README.md new file mode 100644 index 0000000..04211d1 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Learn Request Queue +An app to manage requests for music performance streamers to learn new songs. + +## Bootstrapping a Development Environment + +1. Populate .env with: + + URL_PREFIX=http://localhost + + PGHOST=db + PGDATABASE=postgres + PGUSER=postgres + + TWITCH_CLIENTID=Client ID from dev.twitch.tv + TWITCH_SECRET=Client Secret from dev.twitch.tv + SESSION_SECRET=Randomly generated secret + +2. `docker-compose up` (optionally with `-d`) +3. `docker exec -i learn-request-queue-db /usr/bin/psql -U postgres < db/testdata.sql` diff --git a/db/testdata.sql b/db/testdata.sql new file mode 100644 index 0000000..64d53e9 --- /dev/null +++ b/db/testdata.sql @@ -0,0 +1,5 @@ +INSERT INTO requests (url,requester,score,state) VALUES + ('https://www.youtube.com/watch?v=dQw4w9WgXcQ','virtualdxs',0,'Rejected'), + ('https://www.youtube.com/watch?v=C5oeWHngDS4','virtualdxs',500,'Requested'), + ('https://www.youtube.com/watch?v=vXaJGBLRA_o','virtualdxs',0,'Requested'); + diff --git a/docker-compose.yml b/docker-compose.yml index 1e83076..94cae42 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: - db volumes: - .:/home/app + ports: + - "80:3000" env_file: .env db: container_name: learn-request-queue-db