Vermeide Docker-Hub-Timeouts beim Dev-Build durch GHCR-Basisimage.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
0b3af2dee4
commit
e1800e7b0f
|
|
@ -41,7 +41,7 @@ jobs:
|
||||||
export ENGINE_BUILD BUYING_AGENT_API_PORT
|
export ENGINE_BUILD BUYING_AGENT_API_PORT
|
||||||
ENGINE_BUILD="$(git rev-parse --short HEAD)"
|
ENGINE_BUILD="$(git rev-parse --short HEAD)"
|
||||||
BUYING_AGENT_API_PORT=8095
|
BUYING_AGENT_API_PORT=8095
|
||||||
docker compose -f docker-compose.dev-env.yml build --no-cache api
|
docker compose -f docker-compose.dev-env.yml build --pull=false api
|
||||||
if ! ENGINE_BUILD="$ENGINE_BUILD" BUYING_AGENT_API_PORT="$BUYING_AGENT_API_PORT" \
|
if ! ENGINE_BUILD="$ENGINE_BUILD" BUYING_AGENT_API_PORT="$BUYING_AGENT_API_PORT" \
|
||||||
docker compose -f docker-compose.dev-env.yml up -d --wait; then
|
docker compose -f docker-compose.dev-env.yml up -d --wait; then
|
||||||
echo "compose up --wait failed — api logs:"
|
echo "compose up --wait failed — api logs:"
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ jobs:
|
||||||
ENGINE_BUILD="$(git rev-parse --short HEAD)"
|
ENGINE_BUILD="$(git rev-parse --short HEAD)"
|
||||||
BUYING_AGENT_API_BIND=0.0.0.0
|
BUYING_AGENT_API_BIND=0.0.0.0
|
||||||
BUYING_AGENT_API_PORT=8006
|
BUYING_AGENT_API_PORT=8006
|
||||||
docker compose build --no-cache api
|
docker compose build --pull=false api
|
||||||
if ! ENGINE_BUILD="$ENGINE_BUILD" \
|
if ! ENGINE_BUILD="$ENGINE_BUILD" \
|
||||||
BUYING_AGENT_API_BIND="$BUYING_AGENT_API_BIND" \
|
BUYING_AGENT_API_BIND="$BUYING_AGENT_API_BIND" \
|
||||||
BUYING_AGENT_API_PORT="$BUYING_AGENT_API_PORT" \
|
BUYING_AGENT_API_PORT="$BUYING_AGENT_API_PORT" \
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
FROM python:3.13-slim-bookworm AS base
|
FROM ghcr.io/astral-sh/uv:0.10.11-python3.13-trixie-slim AS base
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends libpq5 \
|
&& apt-get install -y --no-install-recommends libpq5 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=ghcr.io/astral-sh/uv:0.10.11 /uv /usr/local/bin/uv
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV UV_COMPILE_BYTECODE=1 \
|
ENV UV_COMPILE_BYTECODE=1 \
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,8 @@ Watchtower bleibt aus.
|
||||||
| `deploy-prod.yml` | Push `main` | Deploy nach `~/docker/buyingagent`, Health `localhost:8006` |
|
| `deploy-prod.yml` | Push `main` | Deploy nach `~/docker/buyingagent`, Health `localhost:8006` |
|
||||||
| `test.yml` | nach Dev-Deploy bzw. Push `develop` | nicht-schreibender Smoke gegen `/health/live` und `/health/ready` |
|
| `test.yml` | nach Dev-Deploy bzw. Push `develop` | nicht-schreibender Smoke gegen `/health/live` und `/health/ready` |
|
||||||
|
|
||||||
|
Der API-Build nutzt `ghcr.io` (nicht Docker Hub). `docker compose build --pull=false` verwendet vorhandene Basis-Images und vermeidet IPv6-Timeouts gegen `auth.docker.io`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Manuelles Deploy
|
## Manuelles Deploy
|
||||||
|
|
@ -74,14 +76,14 @@ Watchtower bleibt aus.
|
||||||
# Development
|
# Development
|
||||||
cd ~/docker/buyingagent-dev
|
cd ~/docker/buyingagent-dev
|
||||||
git fetch origin develop && git reset --hard origin/develop
|
git fetch origin develop && git reset --hard origin/develop
|
||||||
docker compose -f docker-compose.dev-env.yml build --no-cache api
|
docker compose -f docker-compose.dev-env.yml build --pull=false api
|
||||||
BUYING_AGENT_API_PORT=8095 docker compose -f docker-compose.dev-env.yml up -d --wait
|
BUYING_AGENT_API_PORT=8095 docker compose -f docker-compose.dev-env.yml up -d --wait
|
||||||
curl -sf http://localhost:8095/health/ready
|
curl -sf http://localhost:8095/health/ready
|
||||||
|
|
||||||
# Production
|
# Production
|
||||||
cd ~/docker/buyingagent
|
cd ~/docker/buyingagent
|
||||||
git fetch origin main && git reset --hard origin/main
|
git fetch origin main && git reset --hard origin/main
|
||||||
BUYING_AGENT_API_BIND=0.0.0.0 BUYING_AGENT_API_PORT=8006 docker compose build --no-cache api
|
BUYING_AGENT_API_BIND=0.0.0.0 BUYING_AGENT_API_PORT=8006 docker compose build --pull=false api
|
||||||
BUYING_AGENT_API_BIND=0.0.0.0 BUYING_AGENT_API_PORT=8006 docker compose up -d --wait
|
BUYING_AGENT_API_BIND=0.0.0.0 BUYING_AGENT_API_PORT=8006 docker compose up -d --wait
|
||||||
curl -sf http://localhost:8006/health/ready
|
curl -sf http://localhost:8006/health/ready
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user