Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Always clean up docker container on exit, add caveat to README (#1762)

Madison Swain-Bowden64058b9d5b3b
diff --git a/README.md b/README.md
index 1cfcb380e..9803f010e 100644
--- a/README.md
+++ b/README.md
@@ -135,11 +135,36 @@ You can also find the latest `openverse-frontend` images on our [GitHub packages
You can then run using either the locally built image or the `ghcr.io` image from the link above:
```shell
-docker run -it -p 127.0.0.1:8443:8443/tcp openverse-frontend:latest
+docker run --rm -it -p 127.0.0.1:8443:8443/tcp openverse-frontend:latest
```
The app will be available at <http://localhost:8443>.
+> **Note**: If you are _not_ using HTTPS locally, do not use the URL provided by Nuxt - this will cause certificate errors because it gets rerouted to HTTPS.
+> E.g. this link will not work:
+> ```
+> $ docker run --rm -it -p 127.0.0.1:8443:8443/tcp openverse-frontend:latest
+>
+> > nuxt start
+>
+> ℹ Sentry reporting is disabled ("disabled" option has been set) nuxt:sentry 18:22:32
+>
+> ╭─────────────────────────────────────────╮
+> │ │
+> │ Nuxt @ v2.15.8 │
+> │ │
+> │ ▸ Environment: production │
+> │ ▸ Rendering: server-side │
+> │ ▸ Target: server │
+> │ │
+> │ Memory usage: 48.2 MB (RSS: 152 MB) │
+> │ │
+> │ Listening: http://172.17.0.2:8443/ │ <-- Won't work unless HTTPS is set up
+> │ │
+> ╰─────────────────────────────────────────╯
+> ```
+
## Formatting and Linting
The code in this repository is formatted using `prettier`. If you have prettier setup in your code editor it should work out of the box; otherwise you can use the `pnpm lint:fix` script to format and fix lint errors in your code. Checks are run to lint your code and validate the formatting on git precommit using [husky](https://github.com/typicode/husky).