diff --git a/core/src/main/java/org/lflang/generator/docker/DockerComposeGenerator.java b/core/src/main/java/org/lflang/generator/docker/DockerComposeGenerator.java index 08b0df23c6..2ac6c9fa63 100644 --- a/core/src/main/java/org/lflang/generator/docker/DockerComposeGenerator.java +++ b/core/src/main/java/org/lflang/generator/docker/DockerComposeGenerator.java @@ -62,10 +62,20 @@ protected String getServiceDescription(DockerData data) { context: "%s" container_name: "%s" tty: true + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + LF_TELEGRAF_HOST_NAME: ${LF_TELEGRAF_HOST_NAME:-host.docker.internal} """ .formatted(getServiceName(data), getBuildContext(data), getContainerName(data)); } + private String getEnvironmentFile() { + // FIXME: add target property env-files + var file = ".env"; + return "env-file: \"%s\"".formatted(file); + } + /** Return the name of the service represented by the given data. */ protected String getServiceName(DockerData data) { return "main";