You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,8 @@ All contributors (including maintainers) should update `CHANGELOG.md` when creat
80
80
81
81
-**README**: Docker Compose quick start documents **`ghcr.io`****`afp`** pulls (**`GHCR_IMAGE_NAMESPACE`**), **`docker login`** (PAT as password—not account password—plus **`docker logout ghcr.io`**), **`~/.docker/config.json`** vs project **`.env`**, optional **`gh auth token`**, and **SSO** for **`unauthorized`** / **`denied`**.
82
82
83
+
-**CONTRIBUTING**: [Environment setup](CONTRIBUTING.md) clarifies **Compose-only** dev (**skip****`scripts/run-db-and-afp-containers.sh`** to avoid container name clashes) vs **host `pytest`** + that script (same pattern as [`.github/workflows/test.yml`](.github/workflows/test.yml)); database requirement text matches both paths.
84
+
83
85
### Removed
84
86
85
87
-**Scripts**: Removed legacy **`scripts/generate-docker-compose-parts.sh`**; server deploy compose is owned by [**BehindTheMusicTree/infrastructure**](https://github.com/BehindTheMusicTree/infrastructure) (**`generate-docker-compose.sh`** + **`docker-compose.yml.template`**), not partial compose snippets generated from this repository.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,8 @@ cd the-music-tree-api
169
169
170
170
This is the default local workflow for this repository. It runs API + DB + AFP with the same runtime env contract used by deployment.
171
171
172
+
**Compose-only tests:** With this stack, Postgres and AFP are already running as Compose services. Run the suite with **`docker compose exec api pytest`** (see [Testing](#testing)). **Do not** run step 6 in that workflow—it starts duplicate **`docker run`** containers and will **clash on names** with the Compose services. Step 5 is optional on the host when you need the same directories for scripts outside the container; the **`api`** image startup also prepares paths inside the container.
173
+
172
174
5. Set up filesystem:
173
175
174
176
```bash
@@ -183,18 +185,17 @@ cd the-music-tree-api
183
185
- Media files and libraries
184
186
- Temporary uploaded files
185
187
186
-
6. Run database and Audio Fingerprinter containers:
188
+
6.**Alternative — DB and AFP only (host `pytest`, same pattern as CI):**
189
+
190
+
If you install the app with **`pip install -e ".[dev]"`** on the host and run **`pytest`** there (instead of inside the **`api`** container), start Postgres and AFP with:
187
191
188
192
```bash
189
193
bash scripts/run-db-and-afp-containers.sh
190
194
```
191
195
192
-
This starts the required Docker containers:
193
-
194
-
- PostgreSQL database container
195
-
- Audio Fingerprinter (AFP) container
196
+
This script **`docker pull`**s images (via **`docker_image_ref_from_repo_tag`** in **`scripts/utils.sh`**, so **`GHCR_IMAGE_NAMESPACE`** must be set for short image repo names) and **`docker run`**s DB + AFP. GitHub Actions **`.github/workflows/test.yml`** uses the same step. For private **`ghcr.io`** images, **`docker login ghcr.io`** on the host first (see [README](README.md) Quick start).
196
197
197
-
**Note:**Make sure Docker is running before runningthis script.
198
+
**Note:** Docker must be running. Skip this step when you rely solely on step 4’s Compose stack.
198
199
199
200
#### Environment Variables
200
201
@@ -256,7 +257,7 @@ Running the container requires the following environment variables:
256
257
257
258
#### Database Requirement
258
259
259
-
The HearTheMusicTree API requires a PostgreSQL database to function. The database runs in a Docker container, which is started by the `run-db-and-afp-containers.sh` script. This ensures a consistent development environment across all contributors.
260
+
The HearTheMusicTree API requires a PostgreSQL database to function. With **Docker Compose** (step 4), the database is the Compose **`db`** service. With **host `pytest`** (step 6 / CI), the database is a container started by **`scripts/run-db-and-afp-containers.sh`**.
0 commit comments