You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some web apps require additional configuration to work with a path prefix.
Currently, it's not possible to write a single type: service configuration for such apps that would work in all environments:
When a service is run without a gateway, its path prefix contains the project name, so it needs to be hardcoded in the configuration.
When a service is run with a gateway, the path prefix isn't there, so it needs to be omitted from the configuration.
Solution
Add a new system environment variable that would contain the path prefix, e.g. DSTACK_SERVICE_PATH_PREFIX. When running with a gateway, the variable can contain /.
Workaround
Hardcode the path prefix depending on the project and the gateway.
Would you like to help us implement this feature by sending a PR?
Yes
The text was updated successfully, but these errors were encountered:
jvstme
changed the title
[Feature]: Expose the service path prefix in a system environment variable
Expose the service path prefix in a system environment variable
Feb 5, 2025
Problem
Some web apps require additional configuration to work with a path prefix.
Currently, it's not possible to write a single
type: service
configuration for such apps that would work in all environments:Solution
Add a new system environment variable that would contain the path prefix, e.g.
DSTACK_SERVICE_PATH_PREFIX
. When running with a gateway, the variable can contain/
.Workaround
Hardcode the path prefix depending on the project and the gateway.
Would you like to help us implement this feature by sending a PR?
Yes
The text was updated successfully, but these errors were encountered: