unoverse 0.1.80 → 0.1.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -137,7 +137,10 @@
137
137
 
138
138
  - name: "[8/12] Copy .env file"
139
139
  copy:
140
- src: "{{ env_file | default('../../.env.production') }}"
140
+ # Same trap as the compose above: a path relative to the playbook is the monorepo's
141
+ # layout, not an installed CLI's. deploy always passes env_file, so this default is
142
+ # a fallback only — anchored to the universe rather than to node_modules.
143
+ src: "{{ env_file | default(universe_root | default(playbook_dir + '/../..') + '/.env.production') }}"
141
144
  dest: /opt/gravity/.env
142
145
  owner: "{{ ansible_user }}"
143
146
  mode: "0600"
@@ -415,6 +415,21 @@ EOF
415
415
  export ANSIBLE_CONFIG="$ansible_dir/ansible.cfg"
416
416
  local subcommand="${1:-}"
417
417
 
418
+ # A FIRST DEPLOY TO A NEW SERVER IS A PROVISION, NOT AN IMAGE PULL. Bare `deploy` meant
419
+ # only "pull the latest images and restart", which on a freshly built droplet fails on
420
+ # "Destination directory /opt/gravity does not exist" — /opt/gravity being the directory
421
+ # install.yml creates. The remedy was to know that `unoverse deploy init` exists, which
422
+ # is exactly the kind of knowledge this CLI is supposed to remove: deploy owns the whole
423
+ # journey, so it asks the server what it is and picks the right playbook itself.
424
+ if [ -z "$subcommand" ]; then
425
+ if ! ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 \
426
+ "$deploy_user@$deploy_host" 'test -d /opt/gravity' >/dev/null 2>&1; then
427
+ echo ""
428
+ info "New server. Running the full first-time setup ${DIM}(install, database, verify)${NC}"
429
+ subcommand="init"
430
+ fi
431
+ fi
432
+
418
433
  case "$subcommand" in
419
434
  ""|deploy)
420
435
  # THE deploy: the server takes the latest platform images (pull + restart).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.80",
3
+ "version": "0.1.81",
4
4
  "description": "The Unoverse front door — create a Studio project, a universe, or a client app, and launch Studio.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "type": "module",