Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Copy to .env to override docker-compose defaults for local development.
# None of these are required — sane dev defaults are baked into docker-compose.yml.

# Host ports. Only the host side of each mapping -- inside the compose network
# the services always reach each other on the standard ports.
POSTGRES_HOST_PORT=5432
REDIS_HOST_PORT=6379
CORE_API_HOST_PORT=8000
INGESTION_HOST_PORT=8080
FRONTEND_HOST_PORT=5173

POSTGRES_USER=pipelineops
POSTGRES_PASSWORD=pipelineops
POSTGRES_DB=pipelineops
Expand Down
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,27 @@ Go ingestion service, and the frontend, running migrations and seeding an
`admin` / `admin` superuser automatically (dev-only — see `.env.example`
to disable that).

| Service | URL |
|---|---|
| Frontend dashboard | http://localhost:5173 |
| Core API | http://localhost:8000/api/ |
| Django admin | http://localhost:8000/admin/ |
| Ingestion service | http://localhost:8080 |

> If a port above is already taken on your machine, override it, e.g.
> `POSTGRES_HOST_PORT=5434 FRONTEND_HOST_PORT=5175 docker compose up --build`.
| Service | URL | Host port override |
|---|---|---|
| Frontend dashboard | http://localhost:5173 | `FRONTEND_HOST_PORT` |
| Core API | http://localhost:8000/api/ | `CORE_API_HOST_PORT` |
| Django admin | http://localhost:8000/admin/ | `CORE_API_HOST_PORT` |
| Ingestion service | http://localhost:8080 | `INGESTION_HOST_PORT` |
| Postgres | localhost:5432 | `POSTGRES_HOST_PORT` |
| Redis | localhost:6379 | `REDIS_HOST_PORT` |

> Every host port above is overridable, which matters because 5432 and 6379 in
> particular are usually already taken by something. Set them inline or in
> `.env`:
>
> ```bash
> POSTGRES_HOST_PORT=5434 REDIS_HOST_PORT=6380 CORE_API_HOST_PORT=8800 \
> INGESTION_HOST_PORT=8880 FRONTEND_HOST_PORT=5175 docker compose up --build
> ```
>
> Only the host side moves — inside the compose network the services still
> reach each other on the standard ports, and the frontend is built against
> whatever `CORE_API_HOST_PORT` is, so the browser follows automatically.

### Try it end to end

Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
redis:
image: redis:7-alpine
ports:
- "6379:6379"
- "${REDIS_HOST_PORT:-6379}:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
Expand All @@ -45,7 +45,7 @@ services:
DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD:-admin}
DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL:-admin@pipelineops.local}
ports:
- "8000:8000"
- "${CORE_API_HOST_PORT:-8000}:8000"
depends_on:
postgres:
condition: service_healthy
Expand Down Expand Up @@ -93,7 +93,7 @@ services:
REDIS_URL: redis://redis:6379/0
GIN_MODE: release
ports:
- "8080:8080"
- "${INGESTION_HOST_PORT:-8080}:8080"
depends_on:
core-api:
condition: service_healthy
Expand All @@ -109,7 +109,7 @@ services:
build:
context: ./frontend
args:
VITE_API_BASE_URL: http://localhost:8000
VITE_API_BASE_URL: http://localhost:${CORE_API_HOST_PORT:-8000}
ports:
- "${FRONTEND_HOST_PORT:-5173}:80"
depends_on:
Expand Down
Loading