unoverse 0.1.45 → 0.1.47
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.
- package/operator/lib/deploy.sh +22 -6
- package/operator/lib/help.sh +1 -2
- package/package.json +1 -1
package/operator/lib/deploy.sh
CHANGED
|
@@ -23,15 +23,31 @@ cmd_deploy() {
|
|
|
23
23
|
done
|
|
24
24
|
fi
|
|
25
25
|
|
|
26
|
+
# NO SERVER YET is not an error, it is the first question. deploy owns the whole
|
|
27
|
+
# journey: pick the cloud right here (ground is no longer a command to know about),
|
|
28
|
+
# prefill its Terraform, and name the two commands left. `terraform apply` stays the
|
|
29
|
+
# developer's own explicit act — it creates billable infrastructure.
|
|
26
30
|
if [ ! -f "$env_prod" ]; then
|
|
27
|
-
fail ".env.production not found, and no applied Terraform ground to render it from"
|
|
28
31
|
echo ""
|
|
29
|
-
|
|
30
|
-
info " unoverse ground # prefill terraform.tfvars"
|
|
31
|
-
info " cd infra/digitalocean && terraform init && terraform apply # or infra/aws"
|
|
32
|
-
info " cd ../.. && unoverse deploy init"
|
|
32
|
+
echo -e " ${CYAN}${BOLD}Where should this universe live?${NC}"
|
|
33
33
|
echo ""
|
|
34
|
-
|
|
34
|
+
echo -e " ${CYAN}❯${NC} 1 ${BOLD}DigitalOcean${NC}"
|
|
35
|
+
echo -e " 2 AWS"
|
|
36
|
+
echo ""
|
|
37
|
+
local cloud_choice cloud
|
|
38
|
+
read -r -p " Enter to choose, or type 2: " cloud_choice
|
|
39
|
+
case "$cloud_choice" in
|
|
40
|
+
2) cloud=aws ;;
|
|
41
|
+
*) cloud=digitalocean ;;
|
|
42
|
+
esac
|
|
43
|
+
echo ""
|
|
44
|
+
cmd_ground "$([ "$cloud" = "aws" ] && echo aws || echo do)" || exit 1
|
|
45
|
+
echo ""
|
|
46
|
+
info "Your $cloud ground is prefilled. Two commands left:"
|
|
47
|
+
info " cd infra/$cloud && terraform init && terraform apply ${DIM}# creates the server (billable)${NC}"
|
|
48
|
+
info " cd ../.. && unoverse deploy ${DIM}# ships the platform onto it${NC}"
|
|
49
|
+
echo ""
|
|
50
|
+
exit 0
|
|
35
51
|
fi
|
|
36
52
|
|
|
37
53
|
# Read deploy target from .env.production
|
package/operator/lib/help.sh
CHANGED
|
@@ -22,14 +22,13 @@ cmd_help() {
|
|
|
22
22
|
echo -e " ${GREEN}stop${NC} Stop it"
|
|
23
23
|
echo -e " ${GREEN}check${NC} Is it healthy ${DIM}(services, schema, environment)${NC}"
|
|
24
24
|
echo -e " ${GREEN}logs${NC} What is it doing ${DIM}(unoverse logs <service> for one)${NC}"
|
|
25
|
-
echo -e " ${GREEN}deploy${NC} Ship it to
|
|
25
|
+
echo -e " ${GREEN}deploy${NC} Ship it to a server ${DIM}(first run asks which cloud)${NC}"
|
|
26
26
|
echo ""
|
|
27
27
|
# Owner-only lane. Printed ONLY when publish.sh is present, so a starter kit never
|
|
28
28
|
# advertises a command it does not have (sync-starter.sh deletes that file).
|
|
29
29
|
if type cmd_publish >/dev/null 2>&1; then
|
|
30
30
|
echo -e " ${BOLD}${DIM}Platform owner${NC}"
|
|
31
31
|
echo -e " ${GREEN}publish${NC} Full release. Every lane whose content changed"
|
|
32
|
-
echo -e " ${GREEN}ground${NC} Prefill terraform.tfvars from your cloud CLI ${DIM}(do|aws)${NC}"
|
|
33
32
|
echo -e " ${GREEN}dev${NC} Run the monorepo locally"
|
|
34
33
|
echo ""
|
|
35
34
|
fi
|
package/package.json
CHANGED