Skip to content

Commit 49267ac

Browse files
Merge pull request #196 from digitalghost-dev/1.7.3
1.7.3
2 parents cb66d36 + 95ab90f commit 49267ac

File tree

30 files changed

+876
-229
lines changed

30 files changed

+876
-229
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030
- main
3131

3232
env:
33-
VERSION_NUMBER: 'v1.7.2'
33+
VERSION_NUMBER: 'v1.7.3'
3434
DOCKERHUB_REGISTRY_NAME: 'digitalghostdev/poke-cli'
3535
AWS_REGION: 'us-west-2'
3636

@@ -73,7 +73,7 @@ jobs:
7373
- name: Set up Go
7474
uses: actions/setup-go@v5
7575
with:
76-
go-version: '1.24.5'
76+
go-version: '1.24.6'
7777

7878
- name: Build Go Binary
7979
env:

.github/workflows/go_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v5
1818
with:
19-
go-version: '1.24.5'
19+
go-version: '1.24.6'
2020

2121
- name: Install dependencies
2222
run: |

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ builds:
1414
- windows
1515
- darwin
1616
ldflags:
17-
- -s -w -X main.version=v1.7.2
17+
- -s -w -X main.version=v1.7.3
1818

1919
archives:
2020
- formats: [ 'zip' ]

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# build 1
2-
FROM golang:1.24.5-alpine3.22 AS build
2+
FROM golang:1.24.6-alpine3.22 AS build
33

44
WORKDIR /app
55

@@ -8,7 +8,7 @@ RUN go mod download
88

99
COPY . .
1010

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

1313
# build 2
1414
FROM --platform=$BUILDPLATFORM alpine:3.22

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img height="250" width="350" src="pokemon.svg" alt="pokemon-logo"/>
33
<h1>Pokémon CLI</h1>
44
<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">
5-
<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">
5+
<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">
66
<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">
77
</div>
88
<div align="center">
@@ -94,11 +94,11 @@ Cloudsmith is a fully cloud-based service that lets you easily create, store, an
9494
3. Choose how to interact with the container:
9595
* Run a single command and exit:
9696
```bash
97-
docker run --rm -it digitalghostdev/poke-cli:v1.7.2 <command> [subcommand] flag]
97+
docker run --rm -it digitalghostdev/poke-cli:v1.7.3 <command> [subcommand] flag]
9898
```
9999
* Enter the container and use its shell:
100100
```bash
101-
docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.7.2 -c "cd /app && exec sh"
101+
docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.7.3 -c "cd /app && exec sh"
102102
# placed into the /app directory, run the program with './poke-cli'
103103
# example: ./poke-cli ability swift-swim
104104
```

card_data/dagster.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
storage:
2+
postgres:
3+
postgres_db:
4+
username: postgres
5+
password:
6+
env: AWS_RDS_PASSWORD
7+
hostname:
8+
env: AWS_RDS_HOSTNAME
9+
db_name: postgres
10+
port: 5432
11+
params:
12+
sslmode: require
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# /etc/systemd/system/dagster.service
2+
[Unit]
3+
Description=Dagster Development Server
4+
After=network-online.target
5+
Wants=network-online.target
6+
7+
[Service]
8+
Type=simple
9+
User=ubuntu
10+
WorkingDirectory=/home/ubuntu/card_data/card_data
11+
Environment="AWS_DEFAULT_REGION=us-west-2"
12+
Environment="PATH=/home/ubuntu/card_data/card_data/.venv/bin:/usr/local/bin:/usr/bin:/bin"
13+
NoNewPrivileges=true
14+
PrivateTmp=true
15+
ProtectSystem=strict
16+
ProtectHome=read-only
17+
ExecStartPre=/home/ubuntu/wait-for-rds.sh
18+
ExecStart=/home/ubuntu/start-dagster.sh
19+
Restart=on-failure
20+
RestartSec=10
21+
StandardOutput=journal
22+
StandardError=journal
23+
24+
[Install]
25+
WantedBy=multi-user.target
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/bash
2+
3+
# Fetch secrets from AWS Secrets Manager
4+
SUPABASE_SECRETS=$(aws secretsmanager get-secret-value \
5+
--secret-id supabase \
6+
--region us-west-2 \
7+
--query SecretString \
8+
--output text)
9+
10+
AWS_RDS_SECRETS_PW=$(aws secretsmanager get-secret-value \
11+
--secret-id '<secret-name>' \
12+
--region us-west-2 \
13+
--query SecretString \
14+
--output text)
15+
16+
AWS_RDS_SECRETS_HN=$(aws secretsmanager get-secret-value \
17+
--secret-id rds-hostname \
18+
--region us-west-2 \
19+
--query SecretString \
20+
--output text)
21+
22+
# Extract values
23+
SUPABASE_PASSWORD=$(echo "$SUPABASE_SECRETS" | jq -r '.password')
24+
if [ -z "$SUPABASE_PASSWORD" ] || [ "$SUPABASE_PASSWORD" = "null" ]; then
25+
echo "ERROR: missing SUPABASE_PASSWORD from supabase secret" >&2
26+
exit 1
27+
fi
28+
export SUPABASE_PASSWORD
29+
30+
SUPABASE_USER=$(echo "$SUPABASE_SECRETS" | jq -r '.user')
31+
if [ -z "$SUPABASE_USER" ] || [ "$SUPABASE_USER" = "null" ]; then
32+
echo "ERROR: missing SUPABASE_USER from supabase secret" >&2
33+
exit 1
34+
fi
35+
export SUPABASE_USER
36+
37+
AWS_RDS_PASSWORD=$(echo "$AWS_RDS_SECRETS_PW" | jq -r '.password')
38+
if [ -z "$AWS_RDS_PASSWORD" ] || [ "$AWS_RDS_PASSWORD" = "null" ]; then
39+
echo "ERROR: missing AWS_RDS_PASSWORD from RDS secret" >&2
40+
exit 1
41+
fi
42+
export AWS_RDS_PASSWORD
43+
44+
AWS_RDS_HOSTNAME=$(echo "$AWS_RDS_SECRETS_HN" | jq -r '.hostname')
45+
if [ -z "$AWS_RDS_HOSTNAME" ] || [ "$AWS_RDS_HOSTNAME" = "null" ]; then
46+
echo "ERROR: missing AWS_RDS_HOSTNAME from rds-hostname secret" >&2
47+
exit 1
48+
fi
49+
export AWS_RDS_HOSTNAME
50+
51+
DAGSTER_HOME=/home/ubuntu/card_data/card_data/
52+
export DAGSTER_HOME
53+
54+
# Activate the virtual environment
55+
source /home/ubuntu/card_data/card_data/.venv/bin/activate
56+
57+
# Start Dagster
58+
exec dg dev --host 0.0.0.0 --port 3000
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
MAX_TRIES=20
4+
COUNT=0
5+
6+
RDS_HOST="<rds-instance-id>.<region>.rds.amazonaws.com"
7+
RDS_PORT=5432
8+
9+
echo "Checking if RDS is available..."
10+
11+
while [ $COUNT -lt $MAX_TRIES ]; do
12+
if nc -z -w5 $RDS_HOST $RDS_PORT 2>/dev/null; then
13+
echo "RDS is available!"
14+
exit 0
15+
fi
16+
COUNT=$((COUNT + 1))
17+
echo "Attempt $COUNT/$MAX_TRIES - RDS not ready yet..."
18+
sleep 10
19+
done
20+
21+
echo "RDS did not become available in time"
22+
exit 1

card_data/pipelines/poke_cli_dbt/dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'poke_cli_dbt'
2-
version: '1.7.2'
2+
version: '1.7.3'
33

44
profile: 'poke_cli_dbt'
55

0 commit comments

Comments
 (0)