mirror of
https://codeberg.org/likwid/likwid.git
synced 2026-03-26 19:03:08 +00:00
docs(ops): standardize on podman compose
This commit is contained in:
parent
33311c51c8
commit
3b1f8aa177
20 changed files with 269 additions and 266 deletions
|
|
@ -18,7 +18,7 @@
|
|||
- MSVC toolchain for Rust
|
||||
|
||||
**Linux:**
|
||||
- podman-compose
|
||||
- podman compose
|
||||
|
||||
### Quick Setup
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ cp compose/.env.production.example compose/.env.production
|
|||
|
||||
# 4. Deploy
|
||||
cd compose
|
||||
podman-compose --env-file .env.production -f production.yml up -d
|
||||
podman compose --env-file .env.production -f production.yml up -d
|
||||
|
||||
# 5. Access at http://localhost:4321
|
||||
```
|
||||
|
|
@ -57,7 +57,7 @@ cp compose/.env.demo.example compose/.env.demo
|
|||
|
||||
# 2. Deploy
|
||||
cd compose
|
||||
podman-compose --env-file .env.demo -f demo.yml up -d
|
||||
podman compose --env-file .env.demo -f demo.yml up -d
|
||||
|
||||
# 3. Access at http://localhost:4322
|
||||
```
|
||||
|
|
@ -105,8 +105,8 @@ To reset the demo to a clean state:
|
|||
./scripts/demo-reset.sh
|
||||
|
||||
# Or manually:
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml down -v
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml down -v
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
```
|
||||
|
||||
## Configuration Reference
|
||||
|
|
@ -141,7 +141,7 @@ For local development without containers:
|
|||
|
||||
```bash
|
||||
# 1. Start only the database
|
||||
podman-compose -f compose/dev.yml up -d
|
||||
podman compose -f compose/dev.yml up -d
|
||||
|
||||
# 2. Configure backend environment
|
||||
cp backend/.env.example backend/.env
|
||||
|
|
@ -159,10 +159,10 @@ npm run dev
|
|||
|
||||
```bash
|
||||
# View all logs
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml logs -f
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml logs -f
|
||||
|
||||
# View specific service
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml logs -f backend
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml logs -f backend
|
||||
|
||||
# Check health
|
||||
curl http://localhost:3001/health
|
||||
|
|
@ -173,10 +173,10 @@ curl http://localhost:3001/health
|
|||
### Database connection issues
|
||||
```bash
|
||||
# Check if postgres is running
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml ps
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml ps
|
||||
|
||||
# View postgres logs
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml logs postgres
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml logs postgres
|
||||
```
|
||||
|
||||
### Migration failures
|
||||
|
|
@ -194,6 +194,6 @@ SELECT * FROM _sqlx_migrations;
|
|||
### Reset everything
|
||||
```bash
|
||||
# Nuclear option - removes all data and volumes
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml down -v
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml down -v
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
```
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ Likwid implements a set of principles for **modular governance infrastructure**:
|
|||
|
||||
**Linux:**
|
||||
|
||||
- Podman + podman-compose
|
||||
- Podman + podman compose
|
||||
- Rust (rustup)
|
||||
- Node.js LTS
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ sqlx migrate run --source migrations_demo
|
|||
```bash
|
||||
# Uses separate database on port 5433, backend on 3001, frontend on 4322
|
||||
cp compose/.env.demo.example compose/.env.demo
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
podman compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
```
|
||||
|
||||
### For real users (Production)
|
||||
|
|
@ -76,7 +76,7 @@ cp compose/.env.production.example compose/.env.production
|
|||
# Edit with secure passwords and your domain
|
||||
|
||||
# 2. Deploy
|
||||
podman-compose --env-file compose/.env.production -f compose/production.yml up -d
|
||||
podman compose --env-file compose/.env.production -f compose/production.yml up -d
|
||||
```
|
||||
|
||||
## Common Tasks
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Demo deployment - includes demo users, seed data, and restricted actions
|
||||
# Usage: podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
# Reset: podman-compose --env-file compose/.env.demo -f compose/demo.yml down -v; podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
# Usage: podman compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
# Reset: podman compose --env-file compose/.env.demo -f compose/demo.yml down -v; podman compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
|
||||
services:
|
||||
postgres:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Production deployment - clean instance without demo data
|
||||
# Usage: podman-compose -f compose/production.yml up -d
|
||||
# Usage: podman compose -f compose/production.yml up -d
|
||||
|
||||
services:
|
||||
postgres:
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ find "$BACKUP_DIR" -name "*.dump.gz" -mtime +$RETENTION_DAYS -delete
|
|||
### Containerized Backup
|
||||
|
||||
```bash
|
||||
# If using podman-compose
|
||||
# If using podman compose
|
||||
podman exec likwid-prod-db pg_dump -U likwid likwid_prod > backup.sql
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Managed via the Admin panel or API:
|
|||
- **Instance Name** - Display name for your Likwid instance
|
||||
- **Instance Description** - Brief description
|
||||
- **Registration** - Open, invite-only, or closed
|
||||
- **Email Verification** - Required or optional
|
||||
- **Approval workflows** - Registration and community creation can be open, invite-only, or require admin approval
|
||||
|
||||
### Features
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Required settings:
|
|||
|
||||
```bash
|
||||
cd compose
|
||||
podman-compose --env-file .env.production -f production.yml up -d
|
||||
podman compose --env-file .env.production -f production.yml up -d
|
||||
```
|
||||
|
||||
### 4. Access
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Likwid is a modular governance platform for distributed organizations. This guid
|
|||
- Email address
|
||||
- Display name (shown to others)
|
||||
- Password
|
||||
4. Verify your email if required by the instance
|
||||
4. If registration requires approval, your account will be pending until an admin approves it
|
||||
|
||||
## Exploring Without an Account
|
||||
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ if (Test-Path $envFile) {
|
|||
}
|
||||
|
||||
Write-Host "`n[1/3] Stopping demo containers and removing volumes..." -ForegroundColor Yellow
|
||||
podman-compose @composeArgs down --remove-orphans -v
|
||||
podman compose @composeArgs down --remove-orphans -v
|
||||
|
||||
Write-Host "`n[2/3] Starting fresh demo instance..." -ForegroundColor Yellow
|
||||
podman-compose @composeArgs up -d
|
||||
podman compose @composeArgs up -d
|
||||
|
||||
Write-Host "`n[3/3] Waiting for services to be ready..." -ForegroundColor Yellow
|
||||
Start-Sleep -Seconds 10
|
||||
|
|
@ -63,4 +63,4 @@ while ($retry -lt $maxRetries) {
|
|||
|
||||
Write-Host "`nWarning: Backend health check timed out. Check logs with:" -ForegroundColor Yellow
|
||||
$composeArgsText = ($composeArgs -join ' ')
|
||||
Write-Host " podman-compose $composeArgsText logs backend"
|
||||
Write-Host " podman compose $composeArgsText logs backend"
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ if [ "$1" != "--force" ] && [ "$1" != "-f" ]; then
|
|||
fi
|
||||
|
||||
echo -e "\n[1/3] Stopping demo containers and removing volumes..."
|
||||
podman-compose "${COMPOSE_ARGS[@]}" down --remove-orphans -v || docker-compose "${COMPOSE_ARGS[@]}" down --remove-orphans -v
|
||||
podman compose "${COMPOSE_ARGS[@]}" down --remove-orphans -v || podman-compose "${COMPOSE_ARGS[@]}" down --remove-orphans -v || docker-compose "${COMPOSE_ARGS[@]}" down --remove-orphans -v
|
||||
|
||||
echo -e "\n[2/3] Starting fresh demo instance..."
|
||||
podman-compose "${COMPOSE_ARGS[@]}" up -d || docker-compose "${COMPOSE_ARGS[@]}" up -d
|
||||
podman compose "${COMPOSE_ARGS[@]}" up -d || podman-compose "${COMPOSE_ARGS[@]}" up -d || docker-compose "${COMPOSE_ARGS[@]}" up -d
|
||||
|
||||
echo -e "\n[3/3] Waiting for services to be ready..."
|
||||
sleep 5
|
||||
|
|
@ -54,5 +54,5 @@ while [ $retry -lt $max_retries ]; do
|
|||
done
|
||||
|
||||
echo -e "\nWarning: Backend health check timed out. Check logs with:"
|
||||
echo " podman-compose ${COMPOSE_ARGS[*]} logs backend"
|
||||
echo " podman compose ${COMPOSE_ARGS[*]} logs backend"
|
||||
echo " docker-compose ${COMPOSE_ARGS[*]} logs backend"
|
||||
|
|
|
|||
|
|
@ -27,19 +27,19 @@ function Invoke-Compose {
|
|||
[Parameter(Mandatory=$true)][string[]]$Args
|
||||
)
|
||||
|
||||
$podmanCompose = Get-Command podman-compose -ErrorAction SilentlyContinue
|
||||
if ($podmanCompose) {
|
||||
$null = & podman-compose @Args
|
||||
return $LASTEXITCODE
|
||||
}
|
||||
|
||||
$podman = Get-Command podman -ErrorAction SilentlyContinue
|
||||
if ($podman) {
|
||||
$null = & podman compose @Args
|
||||
return $LASTEXITCODE
|
||||
}
|
||||
|
||||
throw 'Neither podman-compose nor podman was found in PATH.'
|
||||
$podmanCompose = Get-Command podman-compose -ErrorAction SilentlyContinue
|
||||
if ($podmanCompose) {
|
||||
$null = & podman-compose @Args
|
||||
return $LASTEXITCODE
|
||||
}
|
||||
|
||||
throw 'Neither podman nor podman-compose was found in PATH.'
|
||||
}
|
||||
|
||||
function Get-CommandLine {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ fi
|
|||
|
||||
# Start PostgreSQL
|
||||
echo "Starting PostgreSQL..."
|
||||
podman-compose -f "$ROOT_DIR/compose/dev.yml" up -d 2>/dev/null || true
|
||||
podman compose -f "$ROOT_DIR/compose/dev.yml" up -d 2>/dev/null || podman-compose -f "$ROOT_DIR/compose/dev.yml" up -d 2>/dev/null || true
|
||||
|
||||
# Wait for PostgreSQL
|
||||
echo "Waiting for PostgreSQL..."
|
||||
|
|
|
|||
|
|
@ -19,19 +19,19 @@ function Invoke-Compose {
|
|||
[Parameter(Mandatory=$true)][string[]]$Args
|
||||
)
|
||||
|
||||
$podmanCompose = Get-Command podman-compose -ErrorAction SilentlyContinue
|
||||
if ($podmanCompose) {
|
||||
$null = & podman-compose @Args
|
||||
return $LASTEXITCODE
|
||||
}
|
||||
|
||||
$podman = Get-Command podman -ErrorAction SilentlyContinue
|
||||
if ($podman) {
|
||||
$null = & podman compose @Args
|
||||
return $LASTEXITCODE
|
||||
}
|
||||
|
||||
throw 'Neither podman-compose nor podman was found in PATH.'
|
||||
$podmanCompose = Get-Command podman-compose -ErrorAction SilentlyContinue
|
||||
if ($podmanCompose) {
|
||||
$null = & podman-compose @Args
|
||||
return $LASTEXITCODE
|
||||
}
|
||||
|
||||
throw 'Neither podman nor podman-compose was found in PATH.'
|
||||
}
|
||||
|
||||
function Get-CommandLine {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ pkill -f "astro dev" 2>/dev/null || true
|
|||
# Stop PostgreSQL if requested
|
||||
if [ "$STOP_DB" = "--all" ] || [ "$STOP_DB" = "-a" ]; then
|
||||
echo "Stopping PostgreSQL..."
|
||||
podman-compose -f "$ROOT_DIR/compose/dev.yml" down 2>/dev/null || true
|
||||
podman compose -f "$ROOT_DIR/compose/dev.yml" down 2>/dev/null || podman-compose -f "$ROOT_DIR/compose/dev.yml" down 2>/dev/null || true
|
||||
fi
|
||||
|
||||
echo "Done."
|
||||
|
|
|
|||
|
|
@ -1 +1,4 @@
|
|||
podman-compose -f compose/dev.yml up
|
||||
podman compose -f compose/dev.yml up
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
podman-compose -f compose/dev.yml up
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
podman-compose -f compose/dev.yml up
|
||||
podman compose -f compose/dev.yml up || podman-compose -f compose/dev.yml up
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Write-Host "=== Likwid Post-Reboot Setup ===" -ForegroundColor Cyan
|
|||
|
||||
# Step 1: Verify WSL2 is working
|
||||
Write-Host "`n[1/4] Checking WSL2 status..." -ForegroundColor Yellow
|
||||
$wslStatus = wsl --status 2>&1
|
||||
wsl --status 2>&1 | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "WSL2 is not ready. Please ensure virtualization is enabled in BIOS." -ForegroundColor Red
|
||||
Write-Host "Run 'wsl --install --no-distribution' as administrator if needed." -ForegroundColor Red
|
||||
|
|
@ -35,7 +35,7 @@ wsl --set-default openSUSE-Tumbleweed
|
|||
# Step 4: Configure Podman in WSL2
|
||||
Write-Host "`n[4/4] Configuring Podman in openSUSE Tumbleweed..." -ForegroundColor Yellow
|
||||
wsl -d openSUSE-Tumbleweed -e bash -c "
|
||||
echo 'Installing Podman and podman-compose...'
|
||||
echo 'Installing Podman and compose support (use: podman compose)'
|
||||
sudo zypper refresh
|
||||
sudo zypper install -y podman podman-compose
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ wsl -d openSUSE-Tumbleweed -e bash -c "
|
|||
|
||||
echo 'Verifying installation...'
|
||||
podman --version
|
||||
podman-compose --version
|
||||
podman compose --help >/dev/null 2>&1 || true
|
||||
"
|
||||
|
||||
Write-Host "`n=== Setup Complete ===" -ForegroundColor Cyan
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ if (Test-Path $demoMigration) {
|
|||
Write-Host "`n=== Production Preparation Complete ===" -ForegroundColor Green
|
||||
Write-Host "`nNext steps:"
|
||||
Write-Host " 1. Configure compose/.env.production"
|
||||
Write-Host " 2. Run: podman-compose -f compose/production.yml up -d"
|
||||
Write-Host " 2. Run: podman compose -f compose/production.yml up -d"
|
||||
|
|
|
|||
Loading…
Reference in a new issue