@@ -21,47 +21,55 @@ Astrolabe is built primarily using [Svelte], [Typescript], and [Tailwind CSS]. [
2121
2222To get started using Astrolabe first you need to run `npm install` inside the `ui` directory.
2323
24−To develop you'll need a running ship to point to. To do so you first need to add a `.env.local` file to the `ui` directory. This file will not be committed. Adding `VITE_SHIP_URL={URL}` where **{URL}** is the URL of the ship you would like to point to, will allow you to run `npm run dev`. This will proxy all requests to the ship except for those powering the interface, allowing you to see live data.
24+To develop you'll need a running ship to point to. If it's running somewhere other than `http://localhost:8081`, make a copy of `.env` in the `ui` directory and name it `.env.local`. This file will not be committed. Change `VITE_SHIP_URL` to the URL of the ship you would like to point to.
25+
26+Once your URL is correctly configured, you can run `npm run dev`. This will proxy all requests to the ship except for those powering the interface, allowing you to see live data.
2527
2628Regardless of what you run to develop, Vite will hot-reload code changes as you work so you don't have to constantly refresh.
2729
28−### Deploying with `glob-ames` glob
30+# Deploying
2931
30321. Spin up a comet or distribution ship.
31332. Mount an `%astrolabe` desk. In Dojo:
3234 1. `|merge %astrolabe our %base` to create a new desk.
33− 2. `|mount %work` to mount it.
35+ 2. `|mount %astrolabe` to mount it.
36+ 3. Set `ASTROLABE_DESK` in `.env.local` if the path to your desk is different.
37+3. Create and upload `glob-http`, if applicable (see below)
34383. Install the desk
35− 1. From the root of the project: `./install.sh path/to/pier/astrolabe`
39+ 1. From the `ui` folder: `npm run install:desk`
3640 2. From the distribution ship's dojo: `:treaty|unpublish %astrolabe`
3741 2. From middleman or distribution ship's dojo: `|commit %astrolabe`
3842 3. (if using a comet as a middleman) `|public %astrolabe`
3943 4. (if using a comet as a middleman) from the actual distribution ship: `|install ~comet-name %astrolabe` or `|resume %astrolabe`
4044 5. (if using a comet as a middleman) from the actual distribution ship: `|pause %astrolabe`
45+4. Build UI and upload `glob-ames`
46+5. Publish the desk from dojo: `:treaty|publish %astrolabe`
47+
48+### Deploying with `glob-ames` glob
49+1. Put the line `glob-ames+[~dister-midlev-mindyr 0v0]` in `desk.docket-0` if it's not there, where `~dister-midlevi-mindyr` is the `@p` of the distribution ship.
41504. Build the UI with `npm run build` in the `ui` directory which will bundle all the code and assets into the `dist/` folder.
42515. Upload the `dist/` folder as a glob to your distribution ship. Example url: https://distribution.urbit-ship.com/docket/upload
43−6. Publish the desk from dojo: `:treaty|publish %astrolabe`
4452
4553### Deploying with `glob-http` glob
4654
4755To deploy, run `npm run build` in the `ui` directory which will bundle all the code and assets into the `dist/` folder. This can then be made into a glob by doing the following:
4856
49−1. Create or launch an urbit using the -F flag
50−2. On that urbit, if you don't already have a desk to run from, run `|merge %work our %base` to create a new desk and mount it with `|mount %work`.
51−3. Now the `%work` desk is accessible through the host OS's filesystem as a directory of that urbit's pier ie `~/zod/work`.
52−4. From the `ui` directory you can run `rsync -avL --delete dist/ ~/zod/work/astrolabe` where `~/zod` is your fake urbit's pier.
53−5. Once completed you can then run `|commit %work` on your urbit and you should see your files logged back out from the dojo.
54−6. Now run `=dir /=garden` to switch to the garden desk directory
55−7. You can now run `-make-glob %work /astrolabe` which will take the folder where you just added files and create a glob which can be thought of as a sort of bundle. It will be output to `~/zod/.urb/put`.
56−8. If you navigate to `~/zod/.urb/put` you should see a file that looks like this `glob-0v5.fdf99.nph65.qecq3.ncpjn.q13mb.glob`. The characters between `glob-` and `.glob` are a hash of the glob's contents.
57−9. Now that we have the glob it can be uploaded to any publicly available HTTP endpoint that can serve files. This allows the glob to distributed over HTTP.
58−10. Once you've uploaded the glob, you should then update the corresponding entry in the docket file at `desk/desk.docket-0`. Both the full URL and the hash should be updated to match the glob we just created, on the line that looks like this:
59−
60−```hoon
61− glob-http+['https://bootstrap.urbit.org/glob-0v5.fdf99.nph65.qecq3.ncpjn.q13mb.glob' 0v5.fdf99.nph65.qecq3.ncpjn.q13mb]
62−```
63−
64−11. This can now be safely committed and deployed.
57+1. Spin up a globber ship (comet or fakezod) (or just reuse your dev ship for this).
58+2. Mount an `%globber` desk. In Dojo:
59+ 1. `|merge %globber our %base` to create a new desk.
60+ 2. `|mount %globber` to mount it.
61+ 3. Set `GLOBBER_DESK` in `.env.local` if the path to your globber desk is different.
62+4. From the `ui` directory, run `npm run release` to build the ui and copy it to your globber desk
63+5. From the globber ship: `|commit %globber` (create basic mark files (see `png.hoon`) for any files without mark files)
64+6. Now run `=dir /=garden=` to switch to the garden desk directory
65+7. `-make-glob %globber /astrolabe` which will take the folder where you just added files and create a glob which can be thought of as a sort of bundle. It will be output to `~/zod/.urb/put`.
66+8. From the `ui` directory, run `npm run get-glob` to place the latest glob in the `globs` folder.
67+9. Copy the string printed by the last step, and paste it into `desk.docket-0`.
68+8. Upload the glob in `/globs/` to any publicly available HTTP endpoint that can serve files. This allows the glob to distributed over HTTP.
69+10. Once you've uploaded the glob, paste the url into `desk/desk.docket-0`. Both the full URL and the hash should be updated to match the glob we just created, on the line that looks like this:
70+ ```hoon
71+ glob-http+['https://bootstrap.urbit.org/glob-0v5.fdf99.nph65.qecq3.ncpjn.q13mb.glob' 0v5.fdf99.nph65.qecq3.ncpjn.q13mb]
72+ ```
6573
6674[svelte]: https://svelte.dev/
6775[typescript]: https://www.typescriptlang.org/