docs(ops): standardize on podman compose

This commit is contained in:
Marco Allegretti 2026-02-15 16:55:57 +01:00
parent 33311c51c8
commit 3b1f8aa177
20 changed files with 269 additions and 266 deletions

View file

@ -18,7 +18,7 @@
- MSVC toolchain for Rust - MSVC toolchain for Rust
**Linux:** **Linux:**
- podman-compose - podman compose
### Quick Setup ### Quick Setup

View file

@ -44,7 +44,7 @@ cp compose/.env.production.example compose/.env.production
# 4. Deploy # 4. Deploy
cd compose 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 # 5. Access at http://localhost:4321
``` ```
@ -57,7 +57,7 @@ cp compose/.env.demo.example compose/.env.demo
# 2. Deploy # 2. Deploy
cd compose 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 # 3. Access at http://localhost:4322
``` ```
@ -105,8 +105,8 @@ To reset the demo to a clean state:
./scripts/demo-reset.sh ./scripts/demo-reset.sh
# Or manually: # 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 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 up -d
``` ```
## Configuration Reference ## Configuration Reference
@ -141,7 +141,7 @@ For local development without containers:
```bash ```bash
# 1. Start only the database # 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 # 2. Configure backend environment
cp backend/.env.example backend/.env cp backend/.env.example backend/.env
@ -159,10 +159,10 @@ npm run dev
```bash ```bash
# View all logs # 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 # 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 # Check health
curl http://localhost:3001/health curl http://localhost:3001/health
@ -173,10 +173,10 @@ curl http://localhost:3001/health
### Database connection issues ### Database connection issues
```bash ```bash
# Check if postgres is running # 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 # 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 ### Migration failures
@ -194,6 +194,6 @@ SELECT * FROM _sqlx_migrations;
### Reset everything ### Reset everything
```bash ```bash
# Nuclear option - removes all data and volumes # 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 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 up -d
``` ```

View file

@ -82,7 +82,7 @@ Likwid implements a set of principles for **modular governance infrastructure**:
**Linux:** **Linux:**
- Podman + podman-compose - Podman + podman compose
- Rust (rustup) - Rust (rustup)
- Node.js LTS - Node.js LTS

View file

@ -66,7 +66,7 @@ sqlx migrate run --source migrations_demo
```bash ```bash
# Uses separate database on port 5433, backend on 3001, frontend on 4322 # Uses separate database on port 5433, backend on 3001, frontend on 4322
cp compose/.env.demo.example compose/.env.demo 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) ### For real users (Production)
@ -76,7 +76,7 @@ cp compose/.env.production.example compose/.env.production
# Edit with secure passwords and your domain # Edit with secure passwords and your domain
# 2. Deploy # 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 ## Common Tasks

View file

@ -1,6 +1,6 @@
# Demo deployment - includes demo users, seed data, and restricted actions # Demo deployment - includes demo users, seed data, and restricted actions
# Usage: 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 # 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: services:
postgres: postgres:

View file

@ -1,5 +1,5 @@
# Production deployment - clean instance without demo data # 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: services:
postgres: postgres:

View file

@ -49,7 +49,7 @@ find "$BACKUP_DIR" -name "*.dump.gz" -mtime +$RETENTION_DAYS -delete
### Containerized Backup ### Containerized Backup
```bash ```bash
# If using podman-compose # If using podman compose
podman exec likwid-prod-db pg_dump -U likwid likwid_prod > backup.sql podman exec likwid-prod-db pg_dump -U likwid likwid_prod > backup.sql
``` ```

View file

@ -37,7 +37,7 @@ Managed via the Admin panel or API:
- **Instance Name** - Display name for your Likwid instance - **Instance Name** - Display name for your Likwid instance
- **Instance Description** - Brief description - **Instance Description** - Brief description
- **Registration** - Open, invite-only, or closed - **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 ### Features

View file

@ -34,7 +34,7 @@ Required settings:
```bash ```bash
cd compose 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 ### 4. Access

View file

@ -11,7 +11,7 @@ Likwid is a modular governance platform for distributed organizations. This guid
- Email address - Email address
- Display name (shown to others) - Display name (shown to others)
- Password - 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 ## Exploring Without an Account

View file

@ -29,10 +29,10 @@ if (Test-Path $envFile) {
} }
Write-Host "`n[1/3] Stopping demo containers and removing volumes..." -ForegroundColor Yellow 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 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 Write-Host "`n[3/3] Waiting for services to be ready..." -ForegroundColor Yellow
Start-Sleep -Seconds 10 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 Write-Host "`nWarning: Backend health check timed out. Check logs with:" -ForegroundColor Yellow
$composeArgsText = ($composeArgs -join ' ') $composeArgsText = ($composeArgs -join ' ')
Write-Host " podman-compose $composeArgsText logs backend" Write-Host " podman compose $composeArgsText logs backend"

View file

@ -26,10 +26,10 @@ if [ "$1" != "--force" ] && [ "$1" != "-f" ]; then
fi fi
echo -e "\n[1/3] Stopping demo containers and removing volumes..." 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..." 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..." echo -e "\n[3/3] Waiting for services to be ready..."
sleep 5 sleep 5
@ -54,5 +54,5 @@ while [ $retry -lt $max_retries ]; do
done done
echo -e "\nWarning: Backend health check timed out. Check logs with:" 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" echo " docker-compose ${COMPOSE_ARGS[*]} logs backend"

View file

@ -27,19 +27,19 @@ function Invoke-Compose {
[Parameter(Mandatory=$true)][string[]]$Args [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 $podman = Get-Command podman -ErrorAction SilentlyContinue
if ($podman) { if ($podman) {
$null = & podman compose @Args $null = & podman compose @Args
return $LASTEXITCODE 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 { function Get-CommandLine {

View file

@ -30,7 +30,7 @@ fi
# Start PostgreSQL # Start PostgreSQL
echo "Starting 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 # Wait for PostgreSQL
echo "Waiting for PostgreSQL..." echo "Waiting for PostgreSQL..."

View file

@ -19,19 +19,19 @@ function Invoke-Compose {
[Parameter(Mandatory=$true)][string[]]$Args [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 $podman = Get-Command podman -ErrorAction SilentlyContinue
if ($podman) { if ($podman) {
$null = & podman compose @Args $null = & podman compose @Args
return $LASTEXITCODE 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 { function Get-CommandLine {

View file

@ -48,7 +48,7 @@ pkill -f "astro dev" 2>/dev/null || true
# Stop PostgreSQL if requested # Stop PostgreSQL if requested
if [ "$STOP_DB" = "--all" ] || [ "$STOP_DB" = "-a" ]; then if [ "$STOP_DB" = "--all" ] || [ "$STOP_DB" = "-a" ]; then
echo "Stopping PostgreSQL..." 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 fi
echo "Done." echo "Done."

View file

@ -1 +1,4 @@
podman compose -f compose/dev.yml up
if ($LASTEXITCODE -ne 0) {
podman-compose -f compose/dev.yml up podman-compose -f compose/dev.yml up
}

View file

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
podman-compose -f compose/dev.yml up podman compose -f compose/dev.yml up || podman-compose -f compose/dev.yml up

View file

@ -5,7 +5,7 @@ Write-Host "=== Likwid Post-Reboot Setup ===" -ForegroundColor Cyan
# Step 1: Verify WSL2 is working # Step 1: Verify WSL2 is working
Write-Host "`n[1/4] Checking WSL2 status..." -ForegroundColor Yellow 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) { if ($LASTEXITCODE -ne 0) {
Write-Host "WSL2 is not ready. Please ensure virtualization is enabled in BIOS." -ForegroundColor Red 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 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 # Step 4: Configure Podman in WSL2
Write-Host "`n[4/4] Configuring Podman in openSUSE Tumbleweed..." -ForegroundColor Yellow Write-Host "`n[4/4] Configuring Podman in openSUSE Tumbleweed..." -ForegroundColor Yellow
wsl -d openSUSE-Tumbleweed -e bash -c " 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 refresh
sudo zypper install -y podman podman-compose sudo zypper install -y podman podman-compose
@ -44,7 +44,7 @@ wsl -d openSUSE-Tumbleweed -e bash -c "
echo 'Verifying installation...' echo 'Verifying installation...'
podman --version podman --version
podman-compose --version podman compose --help >/dev/null 2>&1 || true
" "
Write-Host "`n=== Setup Complete ===" -ForegroundColor Cyan Write-Host "`n=== Setup Complete ===" -ForegroundColor Cyan

View file

@ -28,4 +28,4 @@ if (Test-Path $demoMigration) {
Write-Host "`n=== Production Preparation Complete ===" -ForegroundColor Green Write-Host "`n=== Production Preparation Complete ===" -ForegroundColor Green
Write-Host "`nNext steps:" Write-Host "`nNext steps:"
Write-Host " 1. Configure compose/.env.production" 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"