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
master
Dessa Simpson 2020-07-06 22:02:28 -07:00
parent 18ff4c9d1f
commit 567b2bba27
3 changed files with 26 additions and 0 deletions

19
README.md Normal file
View File

@ -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`

5
db/testdata.sql Normal file
View File

@ -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');

View File

@ -7,6 +7,8 @@ services:
- db - db
volumes: volumes:
- .:/home/app - .:/home/app
ports:
- "80:3000"
env_file: .env env_file: .env
db: db:
container_name: learn-request-queue-db container_name: learn-request-queue-db