Having troubles with tigris bucket for a few different url_prefixes - Tigris
Having troubles with tigris bucket for a few different url_prefixes
I’m having issues serving various static assets (based on the url_prefix) from a single Tigris bucket.
When I define only one tigris/storage rule in the toml file, the assets are served from the Tigris bucket.
primary_region = "lhr"
[build]
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
processes = ["app"]
[[statics]]
guest_path = "/client-assets/assets"
url_prefix = "/assets"
tigris_bucket = "my-bucket"
[[vm]]
memory = "1gb"
cpu_kind = "shared"
cpus = 1
primary_region = "lhr"
[build]
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
processes = ["app"]
[[statics]]
guest_path = "/client-assets/assets"
url_prefix = "/assets"
tigris_bucket = "my-bucket"
[[vm]]
memory = "1gb"
cpu_kind = "shared"
cpus = 1
But when I add an additional Tigris rule, only the second rule takes effect. For example, with this toml:
primary_region = "lhr"
[build]
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
processes = ["app"]
[[statics]]
guest_path = "/client-assets/assets"
url_prefix = "/assets"
tigris_bucket = "my-bucket"
[[statics]]
guest_path = "/client-assets/brand"
url_prefix = "/brand"
tigris_bucket = "my-bucket"
[[vm]]
memory = "1gb"
cpu_kind = "shared"
cpus = 1
primary_region = "lhr"
[build]
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
processes = ["app"]
[[statics]]
guest_path = "/client-assets/assets"
url_prefix = "/assets"
tigris_bucket = "my-bucket"
[[statics]]
guest_path = "/client-assets/brand"
url_prefix = "/brand"
tigris_bucket = "my-bucket"
[[vm]]
memory = "1gb"
cpu_kind = "shared"
cpus = 1
Files from the brand folder are served from the Tigris bucket, while those from assets are not.
Am I doing something wrong here?