# Example: Simple API with SQLite database
# Scenario: Development/Testing environment
# Deployment: Docker Compose
# Version: 1.0.0

{
  provisioning = {
    project = {
      name = "simple-api",
      version = "0.1.0",
      description = "Simple REST API with SQLite database",
      tags = ["api", "sqlite", "development"],
    },

    services = {
      api = {
        type = 'api,
        image = {
          name = "simple-api",
          tag = "latest",
          build_context = ".",
          dockerfile = "Dockerfile",
        },
        ports = [{
          container_port = 8080,
          host_port = 8080,
          protocol = 'tcp,
        }],
        environment = {
          LOG_LEVEL = "debug",
          DATABASE_PATH = "./data/app.db",
          SERVER_HOST = "0.0.0.0",
          SERVER_PORT = "8080",
        },
        healthcheck = {
          enabled = true,
          endpoint = "/health",
          interval = 30,
          timeout = 10,
          retries = 3,
          start_period = 10,
        },
        volumes = ["./data:/app/data"],
        restart_policy = 'unless-stopped,
        replicas = 1,
      },
    },

    database = {
      type = 'sqlite,
      sqlite = {
        database_path = "./data/app.db",
        journal_mode = 'WAL,
        synchronous = 'NORMAL,
        cache_size = -2000,
        foreign_keys = true,
      },
      migrations_path = "./migrations",
      auto_migrate = false,
    },

    deployment = {
      target = 'docker,
      docker_compose = {
        enabled = true,
        version = 'v3_8,
        env_file = ".env",
      },
    },

    network = {},
    storage = {},
    monitoring = {},
    security = {
      tls = {enabled = false},
      auth = {method = 'none},
    },
  },
}
