Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate static build that can be deployed on Urbit #2577

Open
wants to merge 5 commits into
base: stage
Choose a base branch
from

Conversation

nikugogoi
Copy link

What is the purpose of the change

Adds scripts to generate static build that can be deployed on Urbit

Brief Changelog

  • Adds BASEPATH env for setting basePath in next.config.js
    • This is required as Urbit apps are deployed under /apps URL subpath
    • Also prefixed all image assets URL with BASEPATH env
  • Adds ENABLE_FEATURES env flag for overriding LaunchDarkly feature flags concentratedLiquidity and tokenInfo
    • This is required to show individual asset details page and hidden pools in the app
  • Adds COINGECKO_URL env for overriding default API URL https://coingecko.osmosis.zone/
    • This is required as only setting COINGECKO_API_KEY env was not working
  • Adds URBIT_DEPLOYMENT env flag to use lowercase paths for routing
  • Adds changes for generating static build
    • Yarn script build:static is added to generate a static build
    • Some changes like disabling ISR is done based on env STATIC_EXPORT
    • Adds build-urbit.sh script to sanitize filenames with uppercase letters in the static build output
      • Dynamic path chunk files like [id]-eb2a5a7b0938263e.js are also sanitized as square brackets are not supported in Urbit

Testing and Verifying

  • This change has been tested locally by rebuilding the website and verified content and links are expected
  • App has been tested after deploying to a fake ship

Documentation and Release Note

Does this pull request introduce a new feature or user-facing behavior changes? no
How is the feature or change documented? not applicable

nikugogoi and others added 5 commits December 15, 2023 14:40
* Changes to generate static export

* Implement proxy server for osmosis app API

* Show supercharged pools for demo

* Add script static-export for generating static build

* Show token info for demo in assets page

* Use public coingecko endpoint for demo

* Add Dockerfile for static build and remove proxy script

* Avoid building libs parallely

* Change to web package in Dockerfile.static

* Remove TODO
* Comment feature flags to show supercharged pools and token info

* Comment unused variables

* Use flag ENABLE_FEATURES to override feature flag check
* Use a custom base subpath and lowercase names for assets

* Update custom basepaths for assets

* Avoid changing basepaths for next Link components

* Hardcode basepath for RewardsCard images on StakeDashboard

* Add URBIT_DEPLOYMENT flag to use live app hyperlinks

* Add script to sanitize build filenames

* Comment env variables BASEPATH and URBIT_DEPLOYMENT

* Add bash in docker container

* Use empty string for BASEPATH by default

* Do not use base path for generating assets

* Use lowercase paths for assets route

* Remove live app hyperlinks and use URBIT_DEPLOYMENT flag for lowercase routes

* Update build script for fixing filepaths for dynamic routes

* Compare asset denoms in uppercase

* Use env BASE_PATH in stake dashboard component

---------

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
* Change script name to build-urbit

* Add env variable for Coingecko API URL

* Add env flag ENABLE_FEATURES

* use env WEB_API_BASE_URL for tRPC API
Copy link

vercel bot commented Dec 18, 2023

@nikugogoi is attempting to deploy a commit to the OsmoLabs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Dec 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
osmosis-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2024 10:01pm
osmosis-frontend-dev ❌ Failed (Inspect) Jan 8, 2024 10:01pm

@jonator
Copy link
Member

jonator commented Apr 29, 2024

@nikugogoi any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants