Skip to content

Commit 4f61a9f

Browse files
committed
Resolved url_map error and updated dockerfile
1 parent be0c444 commit 4f61a9f

File tree

2 files changed

+38
-37
lines changed

2 files changed

+38
-37
lines changed

src/webapp/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ COPY --from=builder /app/src /app/src
3232
ENV PATH="/app/.venv/bin:$PATH"
3333

3434
# Run the application.
35-
CMD ["fastapi", "run", "app/src/webapp", "--port", "8080", "--host", "0.0.0.0"]
35+
#CMD ["fastapi", "run", "app/src/webapp", "--port", "8080", "--host", "0.0.0.0"]
36+
CMD ["uvicorn", "src.webapp.main:app", "--host", "0.0.0.0", "--port", "8080"]

terraform/modules/deployment/main.tf

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -157,42 +157,42 @@ module "lb-http" {
157157
}
158158
}
159159
}
160-
create_url_map = false
161-
url_map = google_compute_url_map.url_map.self_link
162-
}
163-
164-
resource "google_compute_url_map" "url_map" {
165-
name = "${var.environment}-tf-cr-url-map-1"
166-
default_service = module.lb-http.backend_services["${var.environment}-frontend"].self_link
167-
168-
host_rule {
169-
hosts = ["*"]
170-
path_matcher = "allpaths"
171-
}
172-
173-
path_matcher {
174-
name = "allpaths"
175-
default_service = module.lb-http.backend_services["${var.environment}-frontend"].self_link
176-
177-
path_rule {
178-
paths = ["/api", "/api/*"]
179-
service = module.lb-http.backend_services["${var.environment}-webapp"].self_link
180-
}
181-
182-
path_rule {
183-
paths = ["/worker", "/worker/*"]
184-
service = module.lb-http.backend_services["${var.environment}-worker"].self_link
185-
}
186-
187-
path_rule {
188-
paths = [
189-
"/build",
190-
"/build/*"
191-
]
192-
service = google_compute_backend_bucket.build.self_link
193-
}
194-
}
195-
}
160+
#create_url_map = false
161+
#url_map = google_compute_url_map.url_map.self_link
162+
}
163+
164+
#resource "google_compute_url_map" "url_map" {
165+
# name = "${var.environment}-tf-cr-url-map-1"
166+
# default_service = module.lb-http.backend_services["${var.environment}-frontend"].self_link
167+
168+
# host_rule {
169+
# hosts = ["*"]
170+
# path_matcher = "allpaths"
171+
# }
172+
#
173+
# path_matcher {
174+
# name = "allpaths"
175+
# default_service = module.lb-http.backend_services["${var.environment}-frontend"].self_link
176+
#
177+
# path_rule {
178+
# paths = ["/api", "/api/*"]
179+
# service = module.lb-http.backend_services["${var.environment}-webapp"].self_link
180+
# }
181+
182+
# path_rule {
183+
# paths = ["/worker", "/worker/*"]
184+
# service = module.lb-http.backend_services["${var.environment}-worker"].self_link
185+
# }
186+
#
187+
# path_rule {
188+
# paths = [
189+
# "/build",
190+
# "/build/*"
191+
# ]
192+
# service = google_compute_backend_bucket.build.self_link
193+
# }
194+
# }
195+
#}
196196

197197
resource "google_storage_bucket" "static_assets" {
198198
name = "${var.project}-${var.environment}-static"

0 commit comments

Comments
 (0)