Skip to content
Merged

1.7.3 #196

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
baf38e8
initial service file commit
digitalghost-dev Oct 24, 2025
58980ea
initial commit
digitalghost-dev Oct 24, 2025
572bf86
initial dagster config commit
digitalghost-dev Oct 24, 2025
ecb172d
adding footnotes extension
digitalghost-dev Oct 26, 2025
473d845
updating version numbers
digitalghost-dev Oct 26, 2025
60e2df1
updating page weight
digitalghost-dev Oct 26, 2025
401c463
updating test data
digitalghost-dev Oct 26, 2025
6075b5a
adding instructions for Elastic IPs and EventBridge
digitalghost-dev Oct 26, 2025
85d5c5c
adding project creation steps
digitalghost-dev Oct 28, 2025
8abe524
adding cloud deployment page
digitalghost-dev Oct 29, 2025
e9d9a92
removing files
digitalghost-dev Oct 29, 2025
ea93523
adding file path comment
digitalghost-dev Oct 29, 2025
6814339
updating weights and headers
digitalghost-dev Oct 29, 2025
4d2425d
updating version numbers
digitalghost-dev Oct 30, 2025
b720f6b
adding custom .svg image
digitalghost-dev Oct 30, 2025
343a8fb
adding stylesheet extension
digitalghost-dev Oct 30, 2025
031ed58
initial commit
digitalghost-dev Oct 30, 2025
7a4e8ce
updating version numbers
digitalghost-dev Nov 1, 2025
c0fc72f
Updating to Go v1.24.6 (#192)
digitalghost-dev Nov 2, 2025
7f4f791
updating secret name
digitalghost-dev Nov 2, 2025
36d3d4b
adding systemd instructions
digitalghost-dev Nov 2, 2025
035d6a8
initial commit
digitalghost-dev Nov 2, 2025
4e7179e
adding secrets manager section
digitalghost-dev Nov 2, 2025
32db79a
fixing formatting
digitalghost-dev Nov 2, 2025
f75ccce
fixing incorrect function call (#193)
digitalghost-dev Nov 2, 2025
dd8929a
removing hardcoded `baseURL` (#194)
digitalghost-dev Nov 2, 2025
6402b82
adding exit code to error handling (#195)
digitalghost-dev Nov 2, 2025
8d8cde8
updating modernc.org/sqlite dependency
digitalghost-dev Nov 2, 2025
91ed75d
updating function call (#193)
digitalghost-dev Nov 2, 2025
229062a
adding prerequisite steps
digitalghost-dev Nov 3, 2025
49fd819
restrict container styling to admonitions and details only
digitalghost-dev Nov 3, 2025
672e5e0
fixing typo
digitalghost-dev Nov 3, 2025
11fd7ee
add security hardening directives to dagster service
digitalghost-dev Nov 3, 2025
7f3dc99
fixing formatting inconsistencies, reflecting new `start-dagster.sh` …
digitalghost-dev Nov 3, 2025
95ab90f
validate secrets before starting Dagster
digitalghost-dev Nov 3, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
- main

env:
VERSION_NUMBER: 'v1.7.2'
VERSION_NUMBER: 'v1.7.3'
DOCKERHUB_REGISTRY_NAME: 'digitalghostdev/poke-cli'
AWS_REGION: 'us-west-2'

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.5'
go-version: '1.24.6'

- name: Build Go Binary
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.5'
go-version: '1.24.6'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builds:
- windows
- darwin
ldflags:
- -s -w -X main.version=v1.7.2
- -s -w -X main.version=v1.7.3

archives:
- formats: [ 'zip' ]
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build 1
FROM golang:1.24.5-alpine3.22 AS build
FROM golang:1.24.6-alpine3.22 AS build

WORKDIR /app

Expand All @@ -8,7 +8,7 @@ RUN go mod download

COPY . .

RUN go build -ldflags "-X main.version=v1.7.2" -o poke-cli .
RUN go build -ldflags "-X main.version=v1.7.3" -o poke-cli .

# build 2
FROM --platform=$BUILDPLATFORM alpine:3.22
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img height="250" width="350" src="pokemon.svg" alt="pokemon-logo"/>
<h1>Pokémon CLI</h1>
<img src="https://img.shields.io/github/v/release/digitalghost-dev/poke-cli?style=flat-square&logo=git&logoColor=FFCC00&label=Release%20Version&labelColor=EEE&color=FFCC00" alt="version-label">
<img src="https://img.shields.io/docker/image-size/digitalghostdev/poke-cli/v1.7.2?arch=arm64&style=flat-square&logo=docker&logoColor=FFCC00&labelColor=EEE&color=FFCC00" alt="docker-image-size">
<img src="https://img.shields.io/docker/image-size/digitalghostdev/poke-cli/v1.7.3?arch=arm64&style=flat-square&logo=docker&logoColor=FFCC00&labelColor=EEE&color=FFCC00" alt="docker-image-size">
<img src="https://img.shields.io/github/actions/workflow/status/digitalghost-dev/poke-cli/ci.yml?branch=main&style=flat-square&logo=github&logoColor=FFCC00&label=CI&labelColor=EEE&color=FFCC00" alt="ci-status-badge">
</div>
<div align="center">
Expand Down Expand Up @@ -94,11 +94,11 @@ Cloudsmith is a fully cloud-based service that lets you easily create, store, an
3. Choose how to interact with the container:
* Run a single command and exit:
```bash
docker run --rm -it digitalghostdev/poke-cli:v1.7.2 <command> [subcommand] flag]
docker run --rm -it digitalghostdev/poke-cli:v1.7.3 <command> [subcommand] flag]
```
* Enter the container and use its shell:
```bash
docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.7.2 -c "cd /app && exec sh"
docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.7.3 -c "cd /app && exec sh"
# placed into the /app directory, run the program with './poke-cli'
# example: ./poke-cli ability swift-swim
```
Expand Down
12 changes: 12 additions & 0 deletions card_data/dagster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
storage:
postgres:
postgres_db:
username: postgres
password:
env: AWS_RDS_PASSWORD
hostname:
env: AWS_RDS_HOSTNAME
db_name: postgres
port: 5432
params:
sslmode: require
25 changes: 25 additions & 0 deletions card_data/infrastructure/dagster.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# /etc/systemd/system/dagster.service
[Unit]
Description=Dagster Development Server
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/card_data/card_data
Environment="AWS_DEFAULT_REGION=us-west-2"
Environment="PATH=/home/ubuntu/card_data/card_data/.venv/bin:/usr/local/bin:/usr/bin:/bin"
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=read-only
ExecStartPre=/home/ubuntu/wait-for-rds.sh
ExecStart=/home/ubuntu/start-dagster.sh
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
58 changes: 58 additions & 0 deletions card_data/infrastructure/start-dagster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

# Fetch secrets from AWS Secrets Manager
SUPABASE_SECRETS=$(aws secretsmanager get-secret-value \
--secret-id supabase \
--region us-west-2 \
--query SecretString \
--output text)

AWS_RDS_SECRETS_PW=$(aws secretsmanager get-secret-value \
--secret-id '<secret-name>' \
--region us-west-2 \
--query SecretString \
--output text)

AWS_RDS_SECRETS_HN=$(aws secretsmanager get-secret-value \
--secret-id rds-hostname \
--region us-west-2 \
--query SecretString \
--output text)
Comment thread
digitalghost-dev marked this conversation as resolved.

# Extract values
SUPABASE_PASSWORD=$(echo "$SUPABASE_SECRETS" | jq -r '.password')
if [ -z "$SUPABASE_PASSWORD" ] || [ "$SUPABASE_PASSWORD" = "null" ]; then
echo "ERROR: missing SUPABASE_PASSWORD from supabase secret" >&2
exit 1
fi
export SUPABASE_PASSWORD

SUPABASE_USER=$(echo "$SUPABASE_SECRETS" | jq -r '.user')
if [ -z "$SUPABASE_USER" ] || [ "$SUPABASE_USER" = "null" ]; then
echo "ERROR: missing SUPABASE_USER from supabase secret" >&2
exit 1
fi
export SUPABASE_USER

AWS_RDS_PASSWORD=$(echo "$AWS_RDS_SECRETS_PW" | jq -r '.password')
if [ -z "$AWS_RDS_PASSWORD" ] || [ "$AWS_RDS_PASSWORD" = "null" ]; then
echo "ERROR: missing AWS_RDS_PASSWORD from RDS secret" >&2
exit 1
fi
export AWS_RDS_PASSWORD

AWS_RDS_HOSTNAME=$(echo "$AWS_RDS_SECRETS_HN" | jq -r '.hostname')
if [ -z "$AWS_RDS_HOSTNAME" ] || [ "$AWS_RDS_HOSTNAME" = "null" ]; then
echo "ERROR: missing AWS_RDS_HOSTNAME from rds-hostname secret" >&2
exit 1
fi
export AWS_RDS_HOSTNAME
Comment thread
digitalghost-dev marked this conversation as resolved.

DAGSTER_HOME=/home/ubuntu/card_data/card_data/
export DAGSTER_HOME

# Activate the virtual environment
source /home/ubuntu/card_data/card_data/.venv/bin/activate

# Start Dagster
exec dg dev --host 0.0.0.0 --port 3000
22 changes: 22 additions & 0 deletions card_data/infrastructure/wait-for-rds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

MAX_TRIES=20
COUNT=0

RDS_HOST="<rds-instance-id>.<region>.rds.amazonaws.com"
Comment thread
digitalghost-dev marked this conversation as resolved.
RDS_PORT=5432

echo "Checking if RDS is available..."

while [ $COUNT -lt $MAX_TRIES ]; do
if nc -z -w5 $RDS_HOST $RDS_PORT 2>/dev/null; then
echo "RDS is available!"
exit 0
fi
COUNT=$((COUNT + 1))
echo "Attempt $COUNT/$MAX_TRIES - RDS not ready yet..."
sleep 10
done

echo "RDS did not become available in time"
exit 1
2 changes: 1 addition & 1 deletion card_data/pipelines/poke_cli_dbt/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'poke_cli_dbt'
version: '1.7.2'
version: '1.7.3'

profile: 'poke_cli_dbt'

Expand Down
2 changes: 1 addition & 1 deletion card_data/pipelines/utils/secret_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def fetch_secret() -> str:
cache_config = SecretCacheConfig()
cache = SecretCache(config=cache_config, client=client)

secret = cache.get_secret_string("supabase-data")
secret = cache.get_secret_string("supabase")
Comment thread
digitalghost-dev marked this conversation as resolved.

# convert to dictionary
secret_dict = json.loads(secret)
Expand Down
2 changes: 1 addition & 1 deletion cmd/berry/berry.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func BerryCommand() (string, error) {
}

// Validate arguments
if err := utils.ValidateTypesArgs(os.Args); err != nil {
if err := utils.ValidateBerryArgs(os.Args); err != nil {
output.WriteString(err.Error())
return output.String(), err
}
Expand Down
1 change: 1 addition & 0 deletions cmd/search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func SearchCommand() {
p := tea.NewProgram(initialModel())
if _, err := p.Run(); err != nil {
fmt.Println("could not start program:", err)
os.Exit(1)
}
}

Expand Down
15 changes: 14 additions & 1 deletion cmd/utils/validateargs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package utils

import (
"fmt"
"github.com/digitalghost-dev/poke-cli/styling"
"strings"

"github.com/digitalghost-dev/poke-cli/styling"
)

// checkLength checks if the number of arguments is lower than the max value. Helper Function.
Expand Down Expand Up @@ -41,6 +42,18 @@ func ValidateAbilityArgs(args []string) error {
return nil
}

func ValidateBerryArgs(args []string) error {
if err := checkLength(args, 3); err != nil {
return err
}

if err := checkNoOtherOptions(args, 3, "<berry>"); err != nil {
return err
}

return nil
}

// ValidateItemArgs validates the command line arguments
func ValidateItemArgs(args []string) error {
if err := checkLength(args, 3); err != nil {
Expand Down
Loading
Loading