Files
soleprint/mainroom/ctrl/README.md
2025-12-24 06:23:31 -03:00

2.8 KiB

Core Nest Control Scripts

Control scripts for managing the core_nest deployment (amar + pawprint).

Structure

ctrl/
├── .env.sync          # Configuration for deploy
├── .exclude           # Rsync exclusion patterns
├── build.sh           # Build Docker images (auto-detects services)
├── deploy.sh          # Deploy to server (sync all files)
├── logs.sh            # View container logs
├── setup.sh           # Initial setup (nginx, certs, .env)
├── start.sh           # Start Docker services
├── status.sh          # Show container status
├── stop.sh            # Stop Docker services
└── manual_sync/       # Source code sync scripts
    ├── sync_ama.sh    # Sync amar source code
    └── sync_pawprint.sh  # Sync pawprint source code

Configuration

Edit .env.sync to configure deployment:

# Server
DEPLOY_SERVER=mariano@mcrn.ar
DEPLOY_REMOTE_PATH=~/core_nest

# Local paths
LOCAL_PAWPRINT_PATH=/home/mariano/wdir/ama/pawprint
LOCAL_AMAR_BASE=/home/mariano/wdir/ama

# Remote paths
REMOTE_PAWPRINT_PATH=/home/mariano/pawprint
REMOTE_AMAR_PATH=/home/mariano/core_nest/amar/src

Usage

Full Deployment

cd ctrl
./deploy.sh              # Deploy everything to server
./deploy.sh --dry-run    # Preview what would be synced

# Then on server:
ssh server 'cd ~/core_nest/ctrl && ./build.sh && ./start.sh -d'

Local Development

./start.sh               # Start all services (foreground, see logs)
./start.sh -d            # Start all services (detached)
./start.sh --build       # Start with rebuild
./start.sh -d --build    # Detached with rebuild
./logs.sh                # View logs
./stop.sh                # Stop all services

Service Management

# All scripts auto-detect services (any dir with docker-compose.yml)

./build.sh               # Build all images
./build.sh amar          # Build only amar images
./build.sh --no-cache    # Force rebuild without cache

./start.sh               # Start all (foreground)
./start.sh -d            # Start all (detached)
./start.sh amar          # Start specific service
./start.sh --build       # Start with rebuild

./stop.sh                # Stop all services
./stop.sh amar           # Stop specific service

./logs.sh                # View all logs
./logs.sh amar           # View amar compose logs
./logs.sh backend        # View specific container logs

./status.sh              # Show container status

Nest vs Pawprint Control

  • core_nest/ctrl/ - Manages the full nest (amar + pawprint) via Docker
  • pawprint/ctrl/ - Manages pawprint services via systemd (alternative deployment)

Use core_nest/ctrl for orchestrating the full nest with Docker Compose. Use pawprint/ctrl for direct systemd deployment of pawprint services only.