Skip to content

Commit

Permalink
Cleanup, modify Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
danscales committed Oct 1, 2024
1 parent 523824b commit 322c855
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10-slim

# New comment to trigger an image rebuild
# Comment to trigger an image rebuild

# Optional build argument for different environments
ARG ENV
Expand Down
6 changes: 4 additions & 2 deletions terraform/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ data "template_file" "step_function_policy" {
}
}

# Hash of the contents of the FastAPI app docker
# Hash of the contents of the FastAPI app docker. The docker commands run in main
# directory (parent directory of terraform directory), and the Docker file is in the
# same directory.
data "external" "hash" {
program = [coalesce(var.hash_script, "${path.module}/scripts/hash.sh"), "${path.root}/../", var.docker_path]
program = ["${path.root}/scripts/hash.sh", "${path.root}/../", "."]
}

18 changes: 0 additions & 18 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,3 @@ variable "api_gateway_url" {
description = "The invoke url of the API Gateway stage"
default = ""
}

variable "root_dir" {
description = "Root dir used in Dockerfile"
type = string
default = "."
}

variable "docker_path" {
description = "Path to Docker image source, relative to root dir"
type = string
default = "."
}

variable "hash_script" {
description = "Path to script to generate hash of source contents"
type = string
default = ""
}

0 comments on commit 322c855

Please sign in to comment.