diff --git a/README.md b/README.md index 17d0205e..470c4631 100644 --- a/README.md +++ b/README.md @@ -93,15 +93,18 @@ lstk --config /path/to/lstk.toml start ```toml [[containers]] -type = "aws" -tag = "latest" -port = "4566" +type = "aws" # Emulator type. Currently supported: "aws" +tag = "latest" # Docker image tag, e.g. "latest", "2026.03" +port = "4566" # Host port the emulator will be accessible on +# volume = "" # Host directory for persistent state (default: OS cache dir) +# env = [] # Named environment profiles to apply (see [env.*] sections below) ``` **Fields:** - `type`: emulator type; only `"aws"` is supported for now - `tag`: Docker image tag for LocalStack (e.g. `"latest"`, `"4.14.0"`); useful for pinning a version - `port`: port LocalStack listens on (default `4566`) +- `volume`: (optional) host directory for persistent emulator state (default: OS cache dir) - `env`: (optional) list of named environment variable groups to inject into the container (see below) ### Passing environment variables to the container @@ -111,16 +114,18 @@ Define reusable named env sets and reference them per container: ```toml [[containers]] type = "aws" -tag = "4.14.0" +tag = "latest" port = "4566" -env = ["prod", "debug"] - -[env.prod] -LOCALSTACK_HOST = "localstack.cloud" +env = ["debug", "ci"] [env.debug] -LS_LOG = "trace" -DEBUG = "1" +DEBUG = "1" +ENFORCE_IAM = "1" +PERSISTENCE = "1" + +[env.ci] +SERVICES = "s3,sqs" +EAGER_SERVICE_LOADING = "1" ``` ## Interactive And Non-Interactive Mode diff --git a/internal/config/default_config.toml b/internal/config/default_config.toml index 261ac62e..45acb3bb 100644 --- a/internal/config/default_config.toml +++ b/internal/config/default_config.toml @@ -15,20 +15,22 @@ port = "4566" # Host port the emulator will be accessible on # # Example variables based on commonly used current config options: # -# DEBUG=1 - Enable verbose logging -# PERSISTENCE=1 - Persist LocalStack state across restarts -# ENFORCE_IAM=1 - Enable IAM enforcement +# DEBUG=1 - Enable verbose logging +# PERSISTENCE=1 - Persist LocalStack state across restarts +# ENFORCE_IAM=1 - Enable IAM policy enforcement +# SERVICES=s3,sqs - Limit services to load +# EAGER_SERVICE_LOADING=1 - Preload services at startup # # See full list of configuration options: # > https://docs.localstack.cloud/references/configuration/ # -# Example: +# Example profiles: # # [env.debug] # DEBUG = "1" -# -# [env.persist] # PERSISTENCE = "1" -# -# [env.security] # ENFORCE_IAM = "1" +# +# [env.ci] +# SERVICES = "s3,sqs" +# EAGER_SERVICE_LOADING = "1"