diff --git a/config/stacks/karakeep.yaml b/config/stacks/karakeep.yaml index 3a1937d..b9528d6 100644 --- a/config/stacks/karakeep.yaml +++ b/config/stacks/karakeep.yaml @@ -87,4 +87,11 @@ karakeep: service_name: "chrome" image_name: "gcr.io/zenika-hub/alpine-chrome:123" networks: - - "karakeep-internal" \ No newline at end of file + - "karakeep-internal" + commands: + - "--no-sandbox" + - "--disable-gpu" + - "--disable-dev-shm-usage" + - "---remote-debugging-address=0.0.0.0" + - "--remote-debugging-port=9222" + - "--hide-scrollbars" \ No newline at end of file diff --git a/terraform/modules/docker-stack/main.tf b/terraform/modules/docker-stack/main.tf index 4312ef3..b94798e 100644 --- a/terraform/modules/docker-stack/main.tf +++ b/terraform/modules/docker-stack/main.tf @@ -30,6 +30,7 @@ module "service_container" { environment_vars = toset(concat(coalesce(var.stack.env, []), local.processed_envs[each.key], coalesce(var.stack.env, []), coalesce(local.oauth_envs[each.key], []))) mounts = concat(coalesce(var.stack.mounts, []), coalesce(each.value.mounts, [])) container_capabilities = each.value.capabilities + commands = each.value.commands # Attach the container to custom networks defined in the stack, but only if the service # explicitly lists that network in its own configuration. diff --git a/terraform/modules/docker-stack/variables.tf b/terraform/modules/docker-stack/variables.tf index 77e444d..ddc6a74 100644 --- a/terraform/modules/docker-stack/variables.tf +++ b/terraform/modules/docker-stack/variables.tf @@ -42,6 +42,7 @@ variable "stack" { password = optional(string, "") env = optional(list(string)) mounts = optional(list(string)) + commands = optional(list(string)) capabilities = optional(object({ add = optional(list(string)) drop = optional(list(string)) diff --git a/terraform/modules/docker/main.tf b/terraform/modules/docker/main.tf index 108057a..e5ffb97 100644 --- a/terraform/modules/docker/main.tf +++ b/terraform/modules/docker/main.tf @@ -26,6 +26,7 @@ resource "docker_container" "container" { restart = var.container_restart dns = local.effective_network_mode != "host" ? var.container_dns_servers : null privileged = var.container_privileged_mode + command = var.commands dynamic "networks_advanced" { for_each = var.attach_to_br1 && local.effective_network_mode != "host" ? [1] : [] diff --git a/terraform/modules/docker/variables.tf b/terraform/modules/docker/variables.tf index 40880de..ed580c3 100644 --- a/terraform/modules/docker/variables.tf +++ b/terraform/modules/docker/variables.tf @@ -31,6 +31,11 @@ variable "web_ui"{ default = null } +variable "commands"{ + type = list(string) + default = null +} + variable "labels"{ type = set(object({ label = string