Skip to content

sndev runs on codespaces #2214

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

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions sndev
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
#!/bin/sh
#!/bin/bash
# sndev - Stacker News Development Environment
# This script manages a docker based Stacker News development environment.
# It provides commands to start, stop, and manage the environment, as well as
# to interact with the Stacker News application, database, and other services.
# Usage: sndev [COMMAND] [OPTIONS]
# Example: sndev start - starts the development environment
# Example: sndev stop - stops the development environment
# Example: sndev logs - shows logs from the development environment
# Example: sndev cli lnd getinfo - runs a command on the lnd service
# Example: sndev pr 123 - fetches and checks out pull request #123
# Example: sndev login nym - logs in as a nym
# Example: sndev set_balance nym 1000000 - sets the balance of a nym to 1,000,000 millisatoshis
# Example: sndev fund lnd_bolt11 - pays a bolt11 for funding
# Example: sndev withdraw 1000 - creates a bolt11 for withdrawal of 1000 sats
# Example: sndev psql - opens psql on the database
# Example: sndev prisma migrate dev - runs a prisma migration

if [ "$CODESPACES" = "true" ]; then
export CPU_SHARES_IMPORTANT=1024
export CPU_SHARES_MODERATE=512
export CPU_SHARES_LOW=256
export OPENSEARCH_PASSWORD=mVchg1T5oA9wudUh
fi

set -e
set -a # automatically export all variables
@@ -687,4 +710,4 @@ call() {
fi
}

call "sndev__$1" "$@"
call "sndev__$1" "$@"