diff --git a/stack_orchestrator/data/compose/docker-compose-osmosis-front-end.yml b/stack_orchestrator/data/compose/docker-compose-osmosis-front-end.yml index 0b779cf2..5b3be072 100644 --- a/stack_orchestrator/data/compose/docker-compose-osmosis-front-end.yml +++ b/stack_orchestrator/data/compose/docker-compose-osmosis-front-end.yml @@ -10,10 +10,7 @@ services: command: ["./build-app.sh"] volumes: - ../config/osmosis/build-app.sh:/app/packages/web/build-app.sh - - urbit_app_builds:/app-builds - # TODO: Refactor common mar files - - ../config/osmosis/urbit-files/mar:/app/packages/web/mar - - ../config/osmosis/urbit-files/desk.docket-0:/app/packages/web/desk.docket-0 + - app_builds:/app-builds nginx: image: nginx:1.23-alpine @@ -23,7 +20,7 @@ services: condition: service_completed_successfully volumes: - ../config/osmosis/nginx:/etc/nginx/conf.d - - urbit_app_builds:/app-builds + - app_builds:/app-builds ports: - "80" healthcheck: @@ -34,4 +31,4 @@ services: start_period: 5s volumes: - urbit_app_builds: + app_builds: diff --git a/stack_orchestrator/data/config/osmosis/build-app.sh b/stack_orchestrator/data/config/osmosis/build-app.sh index f18e99c9..2f3cfd01 100755 --- a/stack_orchestrator/data/config/osmosis/build-app.sh +++ b/stack_orchestrator/data/config/osmosis/build-app.sh @@ -16,6 +16,3 @@ yarn build:static # Move build to app-builds mkdir -p /app-builds/osmosis cp -r ./out /app-builds/osmosis/build - -cp -r mar /app-builds/osmosis/ -cp desk.docket-0 /app-builds/osmosis/ diff --git a/stack_orchestrator/data/config/osmosis/urbit-files/mar/ico.hoon b/stack_orchestrator/data/config/osmosis/urbit-files/mar/ico.hoon new file mode 100644 index 00000000..e862b9b9 --- /dev/null +++ b/stack_orchestrator/data/config/osmosis/urbit-files/mar/ico.hoon @@ -0,0 +1,12 @@ +|_ dat=@ +++ grow + |% + ++ mime [/image/x-icon (as-octs:mimes:html dat)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + ++ noun @ + -- +++ grad %mime +-- diff --git a/stack_orchestrator/data/config/osmosis/urbit-files/mar/jpg.hoon b/stack_orchestrator/data/config/osmosis/urbit-files/mar/jpg.hoon new file mode 100644 index 00000000..81a77d46 --- /dev/null +++ b/stack_orchestrator/data/config/osmosis/urbit-files/mar/jpg.hoon @@ -0,0 +1,12 @@ +|_ dat=@ +++ grow + |% + ++ mime [/image/jpeg (as-octs:mimes:html dat)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + ++ noun @ + -- +++ grad %mime +-- diff --git a/stack_orchestrator/data/config/osmosis/urbit-files/mar/ttf.hoon b/stack_orchestrator/data/config/osmosis/urbit-files/mar/ttf.hoon deleted file mode 100644 index 2d29193e..00000000 --- a/stack_orchestrator/data/config/osmosis/urbit-files/mar/ttf.hoon +++ /dev/null @@ -1,12 +0,0 @@ -|_ dat=octs -++ grow - |% - ++ mime [/font/ttf dat] - -- -++ grab - |% - ++ mime |=([=mite =octs] octs) - ++ noun octs - -- -++ grad %mime --- diff --git a/stack_orchestrator/data/config/osmosis/urbit-files/mar/webp.hoon b/stack_orchestrator/data/config/osmosis/urbit-files/mar/webp.hoon new file mode 100644 index 00000000..1909d0dd --- /dev/null +++ b/stack_orchestrator/data/config/osmosis/urbit-files/mar/webp.hoon @@ -0,0 +1,12 @@ +|_ dat=@ +++ grow + |% + ++ mime [/image/webp (as-octs:mimes:html dat)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + ++ noun @ + -- +++ grad %mime +-- diff --git a/stack_orchestrator/data/config/osmosis/urbit-files/mar/woff.hoon b/stack_orchestrator/data/config/osmosis/urbit-files/mar/woff.hoon deleted file mode 100644 index 2933aea7..00000000 --- a/stack_orchestrator/data/config/osmosis/urbit-files/mar/woff.hoon +++ /dev/null @@ -1,12 +0,0 @@ -|_ dat=octs -++ grow - |% - ++ mime [/font/woff dat] - -- -++ grab - |% - ++ mime |=([=mite =octs] octs) - ++ noun octs - -- -++ grad %mime --- diff --git a/stack_orchestrator/data/container-build/cerc-urbit-globs-host/Dockerfile b/stack_orchestrator/data/container-build/cerc-urbit-globs-host/Dockerfile deleted file mode 100644 index 7a3ca9b7..00000000 --- a/stack_orchestrator/data/container-build/cerc-urbit-globs-host/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM python:3.13.0a2-alpine3.18 - -RUN apk --update --no-cache add alpine-sdk jq bash curl wget - -WORKDIR /app - -ENTRYPOINT [ "bash" ] diff --git a/stack_orchestrator/data/container-build/cerc-urbit-globs-host/build.sh b/stack_orchestrator/data/container-build/cerc-urbit-globs-host/build.sh deleted file mode 100755 index ebd396f1..00000000 --- a/stack_orchestrator/data/container-build/cerc-urbit-globs-host/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# Build the urbit-globs-host image - -source ${CERC_CONTAINER_BASE_DIR}/build-base.sh - -# See: https://stackoverflow.com/a/246128/1701505 -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -docker build -t cerc/urbit-globs-host:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${SCRIPT_DIR} diff --git a/stack_orchestrator/data/stacks/osmosis/README.md b/stack_orchestrator/data/stacks/osmosis/README.md index be9cf1f6..bdf46160 100644 --- a/stack_orchestrator/data/stacks/osmosis/README.md +++ b/stack_orchestrator/data/stacks/osmosis/README.md @@ -3,10 +3,7 @@ Instructions to build and deploy: - Self-hosted gitea - An ipfs node -- Urbit - The osmosis front end - - Hosted on python server - - Deployed on urbit - A laconicd chain ## Setup @@ -43,8 +40,6 @@ Edit `network` in spec file to map container ports to same ports in host ... network: ports: - urbit-fake-ship: - - '8080:80' proxy-server: - '4000:4000' nginx: @@ -73,9 +68,6 @@ Inside the deployment directory, open the file `config.env` and set the followin (Note: Following config can be used as is if the stack is being run locally) ```bash - # App to be installed (Do not change) - CERC_URBIT_APP=osmosis - # Osmosis API base URL # Set this to proxy server endpoint for osmosis app # (Eg. http://localhost:4000 - in case stack is being run locally with proxy enabled) @@ -84,10 +76,6 @@ Inside the deployment directory, open the file `config.env` and set the followin # Optional - # Whether to enable app installation on Urbit - # (just builds and uploads the glob file if disabled) (Default: true) - CERC_ENABLE_APP_INSTALL= - # Whether to run the proxy server # (Disable only if proxy not required to be run) (Default: true) CERC_ENABLE_PROXY= @@ -97,16 +85,6 @@ Inside the deployment directory, open the file `config.env` and set the followin # Upstream API URL CERC_PROXY_UPSTREAM=https://app.osmosis.zone - - # IPFS configuration - - # IFPS endpoint to host the glob file on - # (Default: http://ipfs-glob-host:5001 pointing to in-stack IPFS node) - CERC_IPFS_GLOB_HOST_ENDPOINT= - - # IFPS endpoint to fetch the glob file from - # (Default: http://ipfs-glob-host:8080 pointing to in-stack IPFS node) - CERC_IPFS_SERVER_ENDPOINT= ``` ## Start the stack @@ -127,27 +105,6 @@ laconic-so deployment --dir osmosis-deployment start * The web app can be accessed at http://localhost:3000 -* Run the following to get login password for Urbit web interface: - - ```bash - laconic-so deployment --dir osmosis-deployment exec urbit-fake-ship "curl -s --data '{\"source\":{\"dojo\":\"+code\"},\"sink\":{\"stdout\":null}}' http://localhost:12321" - - # Expected output: "\n"% - ``` - -* Open the Urbit web UI at http://localhost:8080 and use the `PASSWORD` from previous step to login - -* The osmosis app is not available when starting stack for the first time. Check `urbit-fake-ship` logs to see that app has installed - ``` - laconic-so deployment --dir osmosis-deployment logs -f - - # Expected output: - # laconic-3ccf7ee79bdae874-urbit-fake-ship-1 | docket: fetching %http glob for %uniswap desk - # laconic-3ccf7ee79bdae874-urbit-fake-ship-1 | ">="">="Osmosis app installed - ``` - -* The osmosis app will be now visible at http://localhost:8080 - ## Laconic registry Setup a test chain: diff --git a/stack_orchestrator/data/stacks/osmosis/stack.yml b/stack_orchestrator/data/stacks/osmosis/stack.yml index 75dd1b61..221fbb60 100644 --- a/stack_orchestrator/data/stacks/osmosis/stack.yml +++ b/stack_orchestrator/data/stacks/osmosis/stack.yml @@ -12,13 +12,10 @@ containers: # - cerc/act-runner-task-executor - cerc/watcher-ts - cerc/osmosis-front-end - - cerc/urbit-globs-host pods: + # - kubo - proxy-server - osmosis-front-end - - fixturenet-urbit - # TODO: Use kubo instead of ipfs in fixturenet-urbit pod - # - kubo # TODO: Fix pod config for deployment command # TODO: mirroring all of osmosis repos: https://git.vdb.to/cerc-io/hosting/pulls/42 # - name: gitea diff --git a/stack_orchestrator/data/stacks/uniswap-urbit-app/stack.yml b/stack_orchestrator/data/stacks/uniswap-urbit-app/stack.yml index 31499406..1e5ad3f5 100644 --- a/stack_orchestrator/data/stacks/uniswap-urbit-app/stack.yml +++ b/stack_orchestrator/data/stacks/uniswap-urbit-app/stack.yml @@ -6,7 +6,6 @@ repos: containers: - cerc/uniswap-interface - cerc/watcher-ts - - cerc/urbit-globs-host pods: - uniswap-interface - proxy-server