Last active
March 7, 2025 19:06
-
-
Save pxr64/a1b1922ca028cebf94b162937b53ca7c to your computer and use it in GitHub Desktop.
Revisions
-
pxr64 revised this gist
Mar 7, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -115,7 +115,7 @@ fi # Install webapp dependencies echo "π¦ Installing webapp dependencies" cd "$INSTALL_DIR/webapp" yarn install --prod if [ $? -ne 0 ]; then echo "β Failed to install webapp dependencies" exit 1 -
pxr64 revised this gist
Mar 1, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -125,7 +125,7 @@ cd "$INSTALL_DIR" # Build the application echo "π¨ Building the backend" yarn build:hotwallet if [ $? -ne 0 ]; then echo "β Failed to build the backend" exit 1 -
pxr64 revised this gist
Mar 1, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ # Default values BRANCH="main" REPO_URL="https://github.com/pxr64/rune-pool-maker-app.git" WEBAPP_REPO_URL="https://github.com/pxr64/runpool-maker-webapp.git" INSTALL_DIR="$HOME/runepool-dex" # Parse command line arguments -
pxr64 revised this gist
Mar 1, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ # Default values BRANCH="main" REPO_URL="https://github.com/pxr64/rune-pool-maker-app.git" WEBAPP_REPO_URL="https://github.com/pxr64/runepool-maker-webapp.git" INSTALL_DIR="$HOME/runepool-dex" # Parse command line arguments -
pxr64 revised this gist
Mar 1, 2025 . 1 changed file with 27 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,23 +69,38 @@ else fi fi # Check if webapp directory exists and if it's a git repository if [ -d "$INSTALL_DIR/webapp" ]; then if [ -d "$INSTALL_DIR/webapp/.git" ]; then # It's a git repository, update it echo "π₯ Pulling latest webapp changes" cd "$INSTALL_DIR/webapp" git fetch git checkout "$BRANCH" || git checkout main git pull if [ $? -ne 0 ]; then echo "β Failed to pull latest webapp changes" exit 1 fi else # It exists but is not a git repository, remove and clone echo "π Webapp directory exists but is not a git repository. Recreating..." rm -rf "$INSTALL_DIR/webapp" echo "π₯ Cloning webapp repository from $WEBAPP_REPO_URL" git clone "$WEBAPP_REPO_URL" "$INSTALL_DIR/webapp" if [ $? -ne 0 ]; then echo "β Failed to clone webapp repository" exit 1 fi fi else # Webapp directory doesn't exist, clone it echo "π₯ Cloning webapp repository from $WEBAPP_REPO_URL" git clone "$WEBAPP_REPO_URL" "$INSTALL_DIR/webapp" if [ $? -ne 0 ]; then echo "β Failed to clone webapp repository" exit 1 fi fi # Install backend dependencies @@ -105,6 +120,7 @@ if [ $? -ne 0 ]; then echo "β Failed to install webapp dependencies" exit 1 fi cd "$INSTALL_DIR" # Build the application -
pxr64 revised this gist
Mar 1, 2025 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,9 +80,7 @@ if [ ! -d "$INSTALL_DIR/webapp" ]; then else echo "π₯ Pulling latest webapp changes" cd "$INSTALL_DIR/webapp" git clone "$WEBAPP_REPO_URL" "$INSTALL_DIR/webapp" if [ $? -ne 0 ]; then echo "β Failed to pull latest webapp changes" exit 1 -
pxr64 revised this gist
Mar 1, 2025 . 1 changed file with 50 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ # Default values BRANCH="main" REPO_URL="https://github.com/pxr64/rune-pool-maker-app.git" WEBAPP_REPO_URL="https://github.com/pxr64/runepool-webapp.git" INSTALL_DIR="$HOME/runepool-dex" # Parse command line arguments @@ -45,10 +46,10 @@ if [ ! -d "$INSTALL_DIR" ]; then mkdir -p "$INSTALL_DIR" # Clone the repository echo "π₯ Cloning backend repository from $REPO_URL" git clone "$REPO_URL" "$INSTALL_DIR" if [ $? -ne 0 ]; then echo "β Failed to clone backend repository" exit 1 fi @@ -58,38 +59,76 @@ else echo "π Using existing installation directory: $INSTALL_DIR" cd "$INSTALL_DIR" echo "π₯ Pulling latest backend changes" git fetch git checkout "$BRANCH" git pull if [ $? -ne 0 ]; then echo "β Failed to pull latest backend changes" exit 1 fi fi # Clone or update the webapp repository if [ ! -d "$INSTALL_DIR/webapp" ]; then echo "π₯ Cloning webapp repository from $WEBAPP_REPO_URL" git clone "$WEBAPP_REPO_URL" "$INSTALL_DIR/webapp" if [ $? -ne 0 ]; then echo "β Failed to clone webapp repository" exit 1 fi else echo "π₯ Pulling latest webapp changes" cd "$INSTALL_DIR/webapp" git fetch git checkout "$BRANCH" || git checkout main git pull if [ $? -ne 0 ]; then echo "β Failed to pull latest webapp changes" exit 1 fi cd "$INSTALL_DIR" fi # Install backend dependencies echo "π¦ Installing backend dependencies" cd "$INSTALL_DIR" yarn install if [ $? -ne 0 ]; then echo "β Failed to install backend dependencies" exit 1 fi # Install webapp dependencies echo "π¦ Installing webapp dependencies" cd "$INSTALL_DIR/webapp" yarn install if [ $? -ne 0 ]; then echo "β Failed to install webapp dependencies" exit 1 fi cd "$INSTALL_DIR" # Build the application echo "π¨ Building the backend" nest build hotwallet if [ $? -ne 0 ]; then echo "β Failed to build the backend" exit 1 fi echo "π¨ Building the webapp" cd "$INSTALL_DIR/webapp" && yarn build if [ $? -ne 0 ]; then echo "β Failed to build the webapp" exit 1 fi cd "$INSTALL_DIR" echo "β Installation completed successfully!" echo "" echo "π Next Steps:" echo "1. Your application is available in: $INSTALL_DIR" echo "2. To start the server, run: $INSTALL_DIR/start.sh" echo "" -
pxr64 renamed this gist
Mar 1, 2025 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
pxr64 created this gist
Mar 1, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,95 @@ #!/bin/bash # Install script for Runepool DEX # This script pulls the latest code and builds the application # Default values BRANCH="main" REPO_URL="https://github.com/pxr64/rune-pool-maker-app.git" INSTALL_DIR="$HOME/runepool-dex" # Parse command line arguments while [[ $# -gt 0 ]]; do case $1 in -b|--branch) BRANCH="$2" shift 2 ;; -d|--directory) INSTALL_DIR="$2" shift 2 ;; -h|--help) echo "Usage: ./install.sh [options]" echo "Options:" echo " -b, --branch BRANCH Git branch to use (default: main)" echo " -d, --directory DIR Installation directory (default: ~/runepool-dex)" echo " -h, --help Show this help message" exit 0 ;; *) echo "Unknown option: $1" exit 1 ;; esac done echo "π Starting installation with the following configuration:" echo "- Git Branch: $BRANCH" echo "- Installation Directory: $INSTALL_DIR" echo "" # Create installation directory if it doesn't exist if [ ! -d "$INSTALL_DIR" ]; then echo "π Creating installation directory: $INSTALL_DIR" mkdir -p "$INSTALL_DIR" # Clone the repository echo "π₯ Cloning repository from $REPO_URL" git clone "$REPO_URL" "$INSTALL_DIR" if [ $? -ne 0 ]; then echo "β Failed to clone repository" exit 1 fi cd "$INSTALL_DIR" else # Update existing repository echo "π Using existing installation directory: $INSTALL_DIR" cd "$INSTALL_DIR" echo "π₯ Pulling latest changes" git fetch git checkout "$BRANCH" git pull if [ $? -ne 0 ]; then echo "β Failed to pull latest changes" exit 1 fi fi # Install dependencies echo "π¦ Installing dependencies" yarn install if [ $? -ne 0 ]; then echo "β Failed to install dependencies" exit 1 fi # Build the application echo "π¨ Building the application" nest build hotwallet cd webapp && yarn build && cd .. if [ $? -ne 0 ]; then echo "β Failed to build the application" exit 1 fi echo "β Installation completed successfully!" echo "" echo "π Next Steps:" echo "1. Your application is available in: $INSTALL_DIR" echo "2. To start the server, run: $INSTALL_DIR/start-server.sh" echo ""