Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update readme with screenshot, latest podman/docker commands #187

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down