Files
OSIT-AE-Docker-Env/Makefile
Scott Idem dbfa9754d9 chore(deploy): add deploy.sh remote script, update Makefile
- deploy.sh: SSH-triggered deploy for prod and test environments on
  srv-nyx (linode.oneskyit.com). Pulls repos, builds ae_app container
  with correct BUILD_MODE, restarts ae_api.
- Makefile: rename build-ui → build-docker-dev/test/prod to match new
  naming convention; add deploy-remote-test and deploy-remote-prod targets
- .env.default: AE_APP_BUILD_MODE staging → dev (from prior session)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 17:18:52 -04:00

51 lines
1.6 KiB
Makefile

# Aether Platform - Operations Makefile
# Use these shortcuts for faster development and deployment.
.PHONY: up down restart-api build-api build-docker-dev build-docker-test build-docker-prod logs ps deploy-remote-test deploy-remote-prod
# Start the entire stack
up:
docker compose up -d
# Stop the entire stack
down:
docker compose down
# FAST UPDATE: Pick up Python code changes without rebuilding
# Since source is mounted as a volume, we just need to restart the container.
# This takes ~2 seconds instead of ~60 seconds.
restart-api:
docker compose restart ae_api
# REBUILD API: Use this only when requirements.txt or Dockerfile changes.
build-api:
docker compose up -d --build ae_api
# BUILD DOCKER UI: Build the SvelteKit container for the given mode.
# Use 'npm run dev' for active development (Vite HMR, no Docker).
# Use these only when testing the production-like Docker build locally.
build-docker-dev:
docker compose build ae_app && docker compose up -d ae_app
build-docker-test:
docker compose build --build-arg BUILD_MODE=test ae_app && docker compose up -d ae_app
build-docker-prod:
docker compose build --build-arg BUILD_MODE=prod ae_app && docker compose up -d --remove-orphans ae_app
# View combined logs
logs:
docker compose logs -f --tail=100
# Check service status
ps:
docker compose ps
# Remote deploy (SSH to linode.oneskyit.com, run deploy.sh)
# Requires key-based SSH and deploy.sh committed + pulled on the server.
deploy-remote-test:
ssh linode.oneskyit.com 'bash /srv/env/test_aether/deploy.sh test'
deploy-remote-prod:
ssh linode.oneskyit.com 'bash /srv/env/prod_aether/deploy.sh prod'