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
3 changes: 3 additions & 0 deletions backends/advanced/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ services:

# Caddy reverse proxy - provides HTTPS for microphone access
# Access at: https://localhost (accepts self-signed cert warning)
# Only starts when HTTPS is configured (Caddyfile exists)
caddy:
image: caddy:2-alpine
ports:
Expand All @@ -118,6 +119,8 @@ services:
friend-backend:
condition: service_healthy
restart: unless-stopped
profiles:
- https

# Development webui service (use with docker-compose --profile dev up)
webui-dev:
Expand Down
13 changes: 10 additions & 3 deletions services.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,24 @@ def run_compose_command(service_name, command, build=False):
"""Run docker compose command for a service"""
service = SERVICES[service_name]
service_path = Path(service['path'])

if not service_path.exists():
console.print(f"[red]❌ Service directory not found: {service_path}[/red]")
return False

compose_file = service_path / service['compose_file']
if not compose_file.exists():
console.print(f"[red]❌ Docker compose file not found: {compose_file}[/red]")
return False

cmd = ['docker', 'compose']

# For backend service, check if HTTPS is configured (Caddyfile exists)
if service_name == 'backend':
caddyfile_path = service_path / 'Caddyfile'
if caddyfile_path.exists() and caddyfile_path.is_file():
# Enable HTTPS profile to start Caddy service
cmd.extend(['--profile', 'https'])

# Handle speaker-recognition service specially
if service_name == 'speaker-recognition' and command in ['up', 'down']:
Expand Down