Verwende ~/docker/buyingagent als kanonische Server-Pfade.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
cbfe374508
commit
0b3af2dee4
|
|
@ -1,6 +1,6 @@
|
|||
# Copy to .env next to docker-compose*.yml. Never commit .env.
|
||||
# Dev server: /home/lars/docker/buyingagent-dev/.env
|
||||
# Prod server: /home/lars/docker/buyingagent/.env
|
||||
# Dev server: ~/docker/buyingagent-dev/.env
|
||||
# Prod server: ~/docker/buyingagent/.env
|
||||
|
||||
# ─── local / production (docker-compose.yml) ────────────────────────────────
|
||||
DB_NAME=buyingagent
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
set -e
|
||||
echo "=== Deploying BuyingAgent to DEVELOPMENT ==="
|
||||
REPO="http://192.168.2.144:3000/Lars/BuyingAgent.git"
|
||||
TARGET="/home/lars/docker/buyingagent-dev"
|
||||
TARGET="$HOME/docker/buyingagent-dev"
|
||||
mkdir -p "$TARGET"
|
||||
cd "$TARGET"
|
||||
if [ ! -d .git ]; then
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
set -e
|
||||
echo "=== Deploying BuyingAgent to PRODUCTION ==="
|
||||
REPO="http://192.168.2.144:3000/Lars/BuyingAgent.git"
|
||||
TARGET="/home/lars/docker/buyingagent"
|
||||
TARGET="$HOME/docker/buyingagent"
|
||||
mkdir -p "$TARGET"
|
||||
cd "$TARGET"
|
||||
if [ ! -d .git ]; then
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Die Testdatenbank liegt auf tmpfs und leert kein normales Datenvolume.
|
|||
|
||||
| Umgebung | Branch | Verzeichnis | API |
|
||||
|---|---|---|---|
|
||||
| Development | `develop` | `/home/lars/docker/buyingagent-dev` | `http://192.168.2.49:8095` |
|
||||
| Production | `main` | `/home/lars/docker/buyingagent` | `http://192.168.2.49:8006` |
|
||||
| Development | `develop` | `~/docker/buyingagent-dev` | `http://192.168.2.49:8095` |
|
||||
| Production | `main` | `~/docker/buyingagent` | `http://192.168.2.49:8006` |
|
||||
|
||||
Repo: `http://192.168.2.144:3000/Lars/BuyingAgent.git`
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Server development stack: /home/lars/docker/buyingagent-dev
|
||||
# Server development stack: ~/docker/buyingagent-dev
|
||||
# No fixed container_name — Compose prefixes with the project name.
|
||||
|
||||
services:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Local skeleton and production stack.
|
||||
# Local default: 127.0.0.1:8000. Production on the Pi: 0.0.0.0:8006 via .env.
|
||||
# Host path on the server: /home/lars/docker/buyingagent
|
||||
# Host path on the server: ~/docker/buyingagent
|
||||
|
||||
services:
|
||||
postgres:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ v0.1 hat keine Web-UI; öffentlich wird nur die API bereitgestellt.
|
|||
| | Production | Development |
|
||||
|---|------------|-------------|
|
||||
| **Git-Branch** | `main` | `develop` |
|
||||
| **Server-Verzeichnis** | `/home/lars/docker/buyingagent` | `/home/lars/docker/buyingagent-dev` |
|
||||
| **Server-Verzeichnis** | `~/docker/buyingagent` | `~/docker/buyingagent-dev` |
|
||||
| **API-Port** | 8006 | 8095 |
|
||||
| **PostgreSQL** | nur Compose-Netz, DB `buyingagent` | nur Compose-Netz, DB `buyingagent_dev` |
|
||||
| **Compose** | `docker-compose.yml` | `docker-compose.dev-env.yml` |
|
||||
|
|
@ -51,7 +51,7 @@ Die Workflows legen das Verzeichnis an und klonen bei Bedarf selbst. Actions sin
|
|||
Nach dem ersten erfolgreichen Deploy `.env` prüfen und für Production ein eigenes `DB_PASSWORD` setzen. PostgreSQL übernimmt User/Passwort nur beim **ersten** Start des Volumes.
|
||||
|
||||
```bash
|
||||
mkdir -p /home/lars/docker/buyingagent /home/lars/docker/buyingagent-dev
|
||||
mkdir -p ~/docker/buyingagent ~/docker/buyingagent-dev
|
||||
```
|
||||
|
||||
Watchtower bleibt aus.
|
||||
|
|
@ -62,8 +62,8 @@ Watchtower bleibt aus.
|
|||
|
||||
| Workflow | Trigger | Zweck |
|
||||
|----------|---------|--------|
|
||||
| `deploy-dev.yml` | Push `develop` | Deploy nach `/home/lars/docker/buyingagent-dev`, Health `localhost:8095` |
|
||||
| `deploy-prod.yml` | Push `main` | Deploy nach `/home/lars/docker/buyingagent`, Health `localhost:8006` |
|
||||
| `deploy-dev.yml` | Push `develop` | Deploy nach `~/docker/buyingagent-dev`, Health `localhost:8095` |
|
||||
| `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` |
|
||||
|
||||
---
|
||||
|
|
@ -72,14 +72,14 @@ Watchtower bleibt aus.
|
|||
|
||||
```bash
|
||||
# Development
|
||||
cd /home/lars/docker/buyingagent-dev
|
||||
cd ~/docker/buyingagent-dev
|
||||
git fetch origin develop && git reset --hard origin/develop
|
||||
docker compose -f docker-compose.dev-env.yml build --no-cache api
|
||||
BUYING_AGENT_API_PORT=8095 docker compose -f docker-compose.dev-env.yml up -d --wait
|
||||
curl -sf http://localhost:8095/health/ready
|
||||
|
||||
# Production
|
||||
cd /home/lars/docker/buyingagent
|
||||
cd ~/docker/buyingagent
|
||||
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 up -d --wait
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user