Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout. Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
1.3 KiB
Bash
Executable File
29 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Deploy spark-server to the ECS host and join mysql/redis/rustfs on shell_default.
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
HOST="${SPARK_SSH_HOST:-root@47.236.66.9}"
|
|
KEY="${SPARK_SSH_KEY:-$HOME/.ssh/spark-ecs}"
|
|
REMOTE="${SPARK_REMOTE_DIR:-/opt/spark-server}"
|
|
SSH=(ssh -i "$KEY" -o BatchMode=yes -o StrictHostKeyChecking=accept-new "$HOST")
|
|
|
|
rsync -az --delete \
|
|
--exclude '.git/' \
|
|
--exclude 'bin/' \
|
|
--exclude 'logs/' \
|
|
--exclude 'vendor/' \
|
|
--exclude 'examples/' \
|
|
--exclude '.cursor/' \
|
|
--exclude '.idea/' \
|
|
--exclude '.vscode/' \
|
|
-e "ssh -i $KEY -o BatchMode=yes" \
|
|
"$ROOT/" "$HOST:$REMOTE/"
|
|
|
|
"${SSH[@]}" "mkdir -p /data/spark-server/logs && chown -R 10001:10001 /data/spark-server/logs"
|
|
"${SSH[@]}" "cd $REMOTE/deploy/docker && docker compose -f docker-compose.yaml build"
|
|
"${SSH[@]}" "cd $REMOTE/deploy/docker && docker compose -f docker-compose.yaml up -d spark-server"
|
|
"${SSH[@]}" "docker exec spark-server /usr/local/bin/spark-migrate -config /app/configs/config.yaml -dir /app/migrations"
|
|
"${SSH[@]}" "docker ps --filter name=spark-server --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"
|
|
"${SSH[@]}" "curl -fsS http://127.0.0.1:18080/healthz && echo && curl -fsS http://127.0.0.1:18080/readyz && echo"
|