Skip to content

Commit

Permalink
init split
Browse files Browse the repository at this point in the history
  • Loading branch information
luutuankiet committed Aug 27, 2024
1 parent 6920e52 commit f2eb8a7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .env.bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
VIRTUAL_ENV="/workspaces/gtd_ETL/.venv"
PYTHONPATH="/workspaces/gtd_ETL/app"
DBT_PROJECT_DIR="/workspaces/gtd_ETL/dbt_project"
DBT_PROFILES_DIR="/workspaces/gtd_ETL/dbt_project"

DAGSTER_HOME="/workspaces/gtd_ETL"
DAGSTER_DBT_PARSE_PROJECT_ON_LOAD=1
DAGSTER_LOCAL_ARTIFACT_STORAGE_DIR="/workspaces/gtd_ETL/dagster_artifacts"

2 changes: 2 additions & 0 deletions .github/workflows/gh_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:

env:
DBT_VERSION: "1.8.1"
PROJECT_DIR: "./dbt_project"
DW_DBNAME: "gtd_dash"

jobs:
deploy:
Expand Down
14 changes: 2 additions & 12 deletions env.sh → bootstrap_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,23 @@ ENV_WORK_DIR=$(pwd)
# Function to initialize .env file
init_env() {
# Add more environment variables here if needed
cat > ".env" <<EOENV
cat > ".env.bootstrap" <<EOENV
VIRTUAL_ENV="$ENV_WORK_DIR/.venv"
PYTHONPATH="$ENV_WORK_DIR/app"
DBT_PROJECT_DIR="$ENV_WORK_DIR/dbt_project"
DBT_PROFILES_DIR="$ENV_WORK_DIR/dbt_project"
DW_USER="ken"
DW_PASSWORD="Boyluu96"
DW_DBNAME="gtd_dash"
DW_HOST="boyluu0819.ddns.net"
DW_PORT="5433"
DAGSTER_HOME="$ENV_WORK_DIR"
DAGSTER_DBT_PARSE_PROJECT_ON_LOAD=1
DAGSTER_LOCAL_ARTIFACT_STORAGE_DIR="$ENV_WORK_DIR/dagster_artifacts"
DAGSTER_PG_USERNAME="ken"
DAGSTER_PG_PASSWORD="Boyluu96"
DAGSTER_PG_HOST="boyluu0819.ddns.net"
DAGSTER_PG_DB="gtd_dash"
EOENV
}

# Function to source .env file
source_env() {
set -a # Automatically export all variables
. ./.env
. ./.env.bootstrap
set +a # Stop automatically exporting variables
}

Expand Down

0 comments on commit f2eb8a7

Please sign in to comment.