#!/usr/bin/env bash # Deploy Molly Cool to monsterrobot.games/mollycool # # The lander lives on the botchat/games VPS and forum-nginx serves it from a # bind mount of /home/humanjing/monsterrobot.games. That mount is READ-ONLY # inside the container, so `docker cp` fails silently — always write the HOST # path. (Same trap as beyondmorp V2.) # # monsterrobot.games -> /home/humanjing/monsterrobot.games (nginx root) # monsterrobot.games/mollycool -> games/mollycool via a root symlink # # nginx needs no config change: the server block's `location /` try_files # resolves the symlink, which is the same convention not-tonight uses. set -euo pipefail HOST="humanjing@100.71.119.27" LANDER="/home/humanjing/monsterrobot.games" DEST="$LANDER/games/mollycool" URL="https://monsterrobot.games/mollycool/" SRC="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" echo "==> shipping $SRC -> $HOST:$DEST" # Static game only. serve.py is the dev server, test/ is the headless suite, # and neither belongs on a public web root. rsync -az --delete \ --include='index.html' \ --include='src/' --include='src/**' \ --exclude='*' \ "$SRC/" "$HOST:$DEST/" echo "==> ensuring the /mollycool route" ssh "$HOST" "ln -sfn games/mollycool '$LANDER/mollycool' && ls -ld '$LANDER/mollycool'" echo "==> verifying live" STAMP="$(date +%s)" code=$(curl -s -o /dev/null -w '%{http_code}' "$URL?cb=$STAMP") title=$(curl -s "$URL?cb=$STAMP" | grep -o '