Skip to content

Commit

Permalink
chore: use USER_SERVICE instead (#1933)
Browse files Browse the repository at this point in the history
* chore: remove reference to user funciton

* adapt var parsing for port

* remove references from tests
  • Loading branch information
octonato authored Dec 22, 2023
1 parent cb30982 commit 652242f
Show file tree
Hide file tree
Showing 66 changed files with 168 additions and 147 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,14 @@ case class DockerComposeUtils(file: String, envVar: Map[String, String]) {

def userFunctionPort: Int =
envVar
.get("USER_FUNCTION_PORT")
.get("USER_SERVICE_PORT")
.orElse(envVar.get("USER_FUNCTION_PORT")) // legacy name
.map(_.toInt)
.orElse(userFunctionPortFromFile)
.getOrElse(8080)

private def userFunctionPortFromFile: Option[Int] =
lines.collectFirst { case UserFunctionPortExtractor(port) => port }
lines.collectFirst { case UserServicePortExtractor(port) => port }

/**
* Extract all lines starting with [[DevModeSettings.portMappingsKeyPrefix]] The returned Seq only contains the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/

package kalix.devtools.impl
object UserFunctionPortExtractor {
object UserServicePortExtractor {

private val ExtractPort = """USER_FUNCTION_PORT:.*?(\d+).?""".r
private val ExtractPort = """USER_SERVICE_PORT:.*?(\d+).?""".r
private val ExtractLegacyPort = """USER_FUNCTION_PORT:.*?(\d+).?""".r

def unapply(line: String): Option[Int] =
line.trim match {
case ExtractPort(port) => Some(port.toInt)
case _ => None
case ExtractPort(port) => Some(port.toInt)
case ExtractLegacyPort(port) => Some(port.toInt)
case _ => None
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ object DevModeSettingsSpec {
| -Dkalix.dev-mode.service-port-mappings.foo=9001
| -Dkalix.dev-mode.service-port-mappings.bar=9002
| -Dkalix.dev-mode.service-port-mappings.baz=host.docker.internal:9003
| USER_FUNCTION_HOST:${USER_FUNCTION_HOST:-host.docker.internal}
| USER_FUNCTION_PORT:${USER_FUNCTION_PORT:-8081}
| USER_SERVICE_HOST:${USER_SERVICE_HOST:-host.docker.internal}
| USER_SERVICE_PORT:${USER_SERVICE_PORT:-8081}
|""".stripMargin
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class DockerComposeUtilsSpec extends AnyWordSpec with Matchers with OptionValues
| -Dlogback.configurationFile=logback-dev-mode.xml
| -Dkalix.dev-mode.service-port-mappings.foo=9001
| -Dkalix.dev-mode.service-port-mappings.bar=9002
| USER_FUNCTION_HOST:${USER_FUNCTION_HOST:-host.docker.internal}
| USER_FUNCTION_PORT:${USER_FUNCTION_PORT:-8081}
| USER_SERVICE_HOST:${USER_SERVICE_HOST:-host.docker.internal}
| USER_SERVICE_PORT:${USER_SERVICE_PORT:-8081}
|""".stripMargin

"DockerComposeUtils" should {
Expand All @@ -58,8 +58,8 @@ class DockerComposeUtilsSpec extends AnyWordSpec with Matchers with OptionValues
dockerComposeUtils.userFunctionPort shouldBe 8081
}

"favor USER_FUNCTION_PORT env var if set " in {
val envVar = Map("USER_FUNCTION_PORT" -> "8082")
"favor USER_SERVICE_PORT env var if set " in {
val envVar = Map("USER_SERVICE_PORT" -> "8082")
val dockerComposeFile = createTmpFile(defaultFile)
val dockerComposeUtils = DockerComposeUtils(dockerComposeFile, envVar)
dockerComposeUtils.userFunctionPort shouldBe 8082
Expand Down Expand Up @@ -94,7 +94,7 @@ class DockerComposeUtilsSpec extends AnyWordSpec with Matchers with OptionValues
| extra_hosts:
| - "host.docker.internal:host-gateway"
| environment:
| USER_FUNCTION_PORT:8081
| USER_SERVICE_PORT:8081
|""".stripMargin

val dockerComposeFile = createTmpFile(fileWithoutEnvVar)
Expand Down Expand Up @@ -129,8 +129,8 @@ class DockerComposeUtilsSpec extends AnyWordSpec with Matchers with OptionValues
| JAVA_TOOL_OPTIONS: >
| -Dconfig.resource=dev-mode.conf
| -Dlogback.configurationFile=logback-dev-mode.xml
| USER_FUNCTION_HOST:${USER_FUNCTION_HOST:-host.docker.internal}
| USER_FUNCTION_PORT:${USER_FUNCTION_PORT:-8082}
| USER_SERVICE_HOST:${USER_SERVICE_HOST:-host.docker.internal}
| USER_SERVICE_PORT:${USER_SERVICE_PORT:-8082}
|""".stripMargin

val dockerComposeFile = createTmpFile(defaultFile + extraProxy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,28 @@ package kalix.devtools.impl
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec

class UserFunctionPortExtractorSpec extends AnyWordSpec with Matchers {
class UserServicePortExtractorSpec extends AnyWordSpec with Matchers {

"UserFunctionPortExtractor" should {
"extract port from line with different formatting's but starting with USER_FUNCTION_PORT" in {
"extract port from line with different formatting's but starting with USER_SERVICE_PORT" in {
val lines =
// UF ports can come together with env vars
"USER_SERVICE_PORT:${USER_SERVICE_PORT:-8080}" ::
"USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}" ::
" USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}" ::
// UF ports can be defined as integers
"USER_SERVICE_PORT:8080" ::
"USER_SERVICE_PORT: 8080" ::
" USER_SERVICE_PORT: 8080" ::
// UF ports can be defined as strings
"""USER_SERVICE_PORT:"8080"""" ::
"""USER_SERVICE_PORT: "8080" """ ::
Nil

lines.foreach { case UserServicePortExtractor(port) => port shouldBe 8080 }
}

"extract port from line with different formatting's but starting with USER_FUNCTION_PORT (legacy)" in {
val lines =
// UF ports can come together with env vars
"USER_FUNCTION_PORT:${USER_FUNCTION_PORT:-8080}" ::
Expand All @@ -37,14 +55,14 @@ class UserFunctionPortExtractorSpec extends AnyWordSpec with Matchers {
"""USER_FUNCTION_PORT: "8080" """ ::
Nil

lines.foreach { case UserFunctionPortExtractor(port) => port shouldBe 8080 }
lines.foreach { case UserServicePortExtractor(port) => port shouldBe 8080 }
}

"not extract port from line not starting with USER_FUNCTION_PORT" in {

"SOME_OTHER_PORT:8000" match {
case UserFunctionPortExtractor(port) => fail("Should not match line not starting with USER_FUNCTION_PORT")
case _ => succeed
case UserServicePortExtractor(port) => fail("Should not match line not starting with USER_FUNCTION_PORT")
case _ => succeed
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
# Comment to enable ACL check in dev-mode (see https://docs.kalix.io/services/using-acls.html#_local_development_with_acls)
ACL_ENABLED: "false"
# Uncomment to enable advanced view features locally (note: disabled in deployed services by default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
# Comment to enable ACL check in dev-mode (see https://docs.kalix.io/services/using-acls.html#_local_development_with_acls)
ACL_ENABLED: "false"
# Uncomment to enable advanced view features locally (note: disabled in deployed services by default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
# Comment to enable ACL check in dev-mode (see https://docs.kalix.io/services/using-acls.html#_local_development_with_acls)
ACL_ENABLED: "false"
# Uncomment to enable advanced view features locally (note: disabled in deployed services by default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
# Comment to enable ACL check in dev-mode (see https://docs.kalix.io/services/using-acls.html#_local_development_with_acls)
ACL_ENABLED: "false"
# Uncomment to enable advanced view features locally (note: disabled in deployed services by default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
PERSISTENCE_ENABLED: "false" #when true uncomment volumes above
JAVA_TOOL_OPTIONS: >
-Dkalix.proxy.eventing.support=kafka
USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
# configuring kafka broker used for eventing
BROKER_SERVERS: kafka:29092

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
4 changes: 2 additions & 2 deletions samples/java-protobuf-eventsourced-counter/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ services:
environment:
JAVA_TOOL_OPTIONS: >
-Dkalix.proxy.eventing.support=google-pubsub-emulator
USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
depends_on:
gcloud-pubsub-emulator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ services:
environment:
JAVA_TOOL_OPTIONS: >
-Dkalix.dev-mode.service-port-mappings.customer-registry=host.docker.internal:9000
USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: "8081"
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: "8081"

kalix-runtime-customer-registry:
image: gcr.io/kalix-public/kalix-runtime:1.1.27
Expand All @@ -30,8 +30,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: "8080"
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: "8080"

customer-registry:
image: kcr.us-east-1.kalix.io/acme/eventsourced-customer-registry:latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ services:
environment:
JAVA_TOOL_OPTIONS: >
-Dkalix.dev-mode.service-port-mappings.customer-registry=host.docker.internal:9000
USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: "8081"
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: "8081"
#end::customer-registry-subscriber[]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#end::customer-registry[]
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
4 changes: 2 additions & 2 deletions samples/java-protobuf-fibonacci-action/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
4 changes: 2 additions & 2 deletions samples/java-protobuf-first-service/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
4 changes: 2 additions & 2 deletions samples/java-protobuf-reliable-timers/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
4 changes: 2 additions & 2 deletions samples/java-protobuf-valueentity-counter/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
#gcloud-pubsub-emulator:
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
Expand Down
4 changes: 2 additions & 2 deletions samples/java-protobuf-view-store/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
# Enable advanced view features locally (note: disabled in deployed services by default)
VIEW_FEATURES_ALL: "true"
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
Expand Down
4 changes: 2 additions & 2 deletions samples/java-protobuf-web-resources/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ services:
JAVA_TOOL_OPTIONS: >
# jvm -D properties can be added under this environment map (note: remove this comment when adding properties)

USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
USER_SERVICE_HOST: ${USER_SERVICE_HOST:-host.docker.internal}
USER_SERVICE_PORT: ${USER_SERVICE_PORT:-8080}
Loading

0 comments on commit 652242f

Please sign in to comment.