-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
DUCKDB_PATH=lens-public-data/sample | ||
DUCKDB_PATH=lens-public-data/v2_polygon.db |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { Database } from "duckdb-async" | ||
|
||
const accessMode = 0 // 1 = read/write, 0 = read-only | ||
const duckdb = await Database.create(process.env.DUCKDB_PATH, { | ||
access_mode: "READ_ONLY", | ||
}) | ||
const readonly = 1 // 1 = readonly, 0 = readwrite | ||
const duckdb = await Database.create( | ||
process.env.DUCKDB_PATH as string, | ||
readonly | ||
) | ||
|
||
export { duckdb } |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# Set environment variables | ||
REGISTRY="ghcr.io" | ||
IMAGE_NAME="daoleno/lenscan" | ||
DUCKDB_PATH=lens-public-data/v2_polygon.db | ||
|
||
# Ask for the tag | ||
echo "Please enter the tag for the Docker image:" | ||
read TAG | ||
|
||
# Log in to the container registry | ||
echo "Logging in to the container registry..." | ||
echo "Please enter your GitHub Personal Access Token:" | ||
read -s GITHUB_TOKEN # Read the GitHub Token securely | ||
echo $GITHUB_TOKEN | docker login $REGISTRY -u daoleno --password-stdin | ||
|
||
# Build the Docker image, add --build-arg if needed | ||
echo "Building the Docker image..." | ||
docker build -t $REGISTRY/$IMAGE_NAME:$TAG ./dashboard # Ensure the correct build context is used | ||
|
||
# Push the Docker image to the registry | ||
echo "Pushing the Docker image..." | ||
docker push $REGISTRY/$IMAGE_NAME:$TAG | ||
|
||
# Log out from the container registry | ||
echo "Logging out from the container registry..." | ||
docker logout $REGISTRY | ||
|
||
echo "Docker image build and push completed." |