From c61ce743c210c474318fd41ec1eb1079608167ce Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 1 Jul 2024 14:16:33 -0400 Subject: [PATCH] docs: update readme with screenshot, latest podman/docker commands --- README.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ce2f524..c252231 100644 --- a/README.md +++ b/README.md @@ -2,35 +2,33 @@ Silly web app for silly quips. :tada: -[Live Demo](https://quips.infinitewarp.com/quips/) +![quips-screenshot](https://github.com/infinitewarp/quips/assets/1472326/05e6652d-4f61-4d49-9440-99f2ad7369f8) -## Setup +Yes, the names of speakers are jumbled. :slightly_smiling_face: -### Running Locally (macOS) +[Live Demo](https://quips.infinitewarp.com/quips/) -Install and start Docker: +## Setup - brew install --cask docker - open -a Docker +### Running Locally in Podman or Docker -Alternatively, using Docker Toolbox for older CPUs that don't have VT-x and -VT-d: +Using either Podman or Docker, run the app with compose: - brew install --cask docker-toolbox - docker-machine create -d "virtualbox" mydockermachine - eval $(docker-machine env mydockermachine) + podman compose -f dev.yml up --build -Run the app with compose: +The quips app should start serving on http://127.0.0.1:8000/, but you may need to load some data. - docker-compose -f dev.yml up --build +> [!NOTE] +> +> The `dev.yml` compose file is intended only for local use, not production environments. Loading fixture data: - docker-compose -f dev.yml run django /app/manage.py loaddata trek + podman compose -f dev.yml run django /app/manage.py loaddata trek Creating admin user: - docker-compose -f dev.yml run django /app/manage.py createsuperuser + podman compose -f dev.yml run django /app/manage.py createsuperuser ### Importing Quips @@ -49,10 +47,16 @@ The Quips app provides a new Django management command `importquips` to import this particular CSV format. It has an optional argument `--purge` that removes all existing Quips, Quotes, and Speakers before importing the file. -`importquips` usage: +Local `importquips` usage: /app/manage.py importquips [--purge] filename.csv +If you are running in composed containers, you will need to copy the file into the container before running the `importquips` command. For example: + + podman compose -f dev.yml cp ./quips.csv django:/tmp/quips.csv + podman compose -f dev.yml run django /app/manage.py importquips /tmp/quips.csv + + ### API Usage You can query the API for a limited set of read-only data. Supported paths include: