Skip to content

Commit

Permalink
feat: add dockerfile and .env for reproducibility
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfg committed Apr 18, 2024
1 parent e610e92 commit a18a2af
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export TF_VAR_credentials="/path/to/credentials.json"
export TF_VAR_project_id="your-gcp-project-id"
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json
Expand All @@ -200,3 +200,5 @@ override.tf.json
# Ignore CLI configuration files
.terraformrc
terraform.rc

dbt-service-account.json
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM prefecthq/prefect:2-python3.10

COPY . /opt/prefect/prefect-cloud-run-poc

RUN pip install -r /opt/prefect/prefect-cloud-run-poc/flows/brazilian_reits/requirements.txt

CMD ["python3", "/opt/prefect/prefect-cloud-run-poc/flows/brazilian_reits/brazilian_reits.py"]
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ terraform {

provider "google" {
credentials = file(var.credentials)
project = var.project
project = var.project_id
region = "us-central1"
}

Expand Down
6 changes: 2 additions & 4 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
variable "credentials" {
description = "My credentials"
default = "/Users/apple/Documents/data-engineering-course/week_1_basics_n_setup/terraform/keys/my-creds.json"
}

variable "project" {
description = "Project"
default = "arthur-data-engineering-course"
variable "project_id" {
description = "GCP Project"
}

variable "location" {
Expand Down

0 comments on commit a18a2af

Please sign in to comment.