# Docker Compose deployment configuration fragment
# Conditional: when deployment_target == "docker" or deployment_target == "both"

[[elements]]
type = "select"
name = "docker_compose_version"
prompt = "Docker Compose version"
help = "Docker Compose file format version"
options = ["3.8", "3.9"]
default = "3.8"
nickel_path = ["provisioning", "deployment", "docker_compose", "version"]
required = true
when = "deployment_target == docker || deployment_target == both"

[[elements]]
type = "text"
name = "docker_project_name"
prompt = "Docker Compose project name"
help = "Project name for Docker Compose (optional, uses directory name if not set)"
placeholder = "my-app"
nickel_path = ["provisioning", "deployment", "docker_compose", "project_name"]
required = false
when = "deployment_target == docker || deployment_target == both"

[[elements]]
type = "text"
name = "docker_env_file"
prompt = "Environment file path"
help = "Path to .env file for environment variables"
default = ".env"
nickel_path = ["provisioning", "deployment", "docker_compose", "env_file"]
required = true
when = "deployment_target == docker || deployment_target == both"

[[elements]]
type = "select"
name = "restart_policy"
prompt = "Container restart policy"
help = "Restart policy for containers"
options = ["no", "always", "on-failure", "unless-stopped"]
default = "unless-stopped"
nickel_path = ["provisioning", "services", "api", "restart_policy"]
required = true
when = "deployment_target == docker || deployment_target == both"
