Skip to content

Commit 78e0dbd

Browse files
committed
Update configuration examples to match common use cases
1 parent 8b4c9e6 commit 78e0dbd

2 files changed

Lines changed: 29 additions & 20 deletions

File tree

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,36 +93,43 @@ lstk --config /path/to/lstk.toml start
9393

9494
```toml
9595
[[containers]]
96-
type = "aws"
97-
tag = "latest"
98-
port = "4566"
96+
type = "aws" # Emulator type. Currently supported: "aws"
97+
tag = "latest" # Docker image tag, e.g. "latest", "2026.03"
98+
port = "4566" # Host port the emulator will be accessible on
99+
# volume = "" # Host directory for persistent state (default: OS cache dir)
100+
# env = [] # Named environment profiles to apply (see [env.*] sections below)
99101
```
100102

101103
**Fields:**
102104
- `type`: emulator type; only `"aws"` is supported for now
103105
- `tag`: Docker image tag for LocalStack (e.g. `"latest"`, `"4.14.0"`); useful for pinning a version
104106
- `port`: port LocalStack listens on (default `4566`)
107+
- `volume`: (optional) host directory for persistent emulator state (default: OS cache dir)
105108
- `env`: (optional) list of named environment variable groups to inject into the container (see below)
106109

107110
### Passing environment variables to the container
108111

109-
Define reusable named env sets and reference them per container:
112+
Define reusable named env profiles and reference them per container. Profiles are merged, so you can mix and match:
110113

111114
```toml
112115
[[containers]]
113116
type = "aws"
114-
tag = "4.14.0"
117+
tag = "latest"
115118
port = "4566"
116-
env = ["prod", "debug"]
117-
118-
[env.prod]
119-
LOCALSTACK_HOST = "localstack.cloud"
119+
env = ["debug", "ci"]
120120

121121
[env.debug]
122-
LS_LOG = "trace"
123-
DEBUG = "1"
122+
DEBUG = "1"
123+
ENFORCE_IAM = "1"
124+
PERSISTENCE = "1"
125+
126+
[env.ci]
127+
SERVICES = "s3,sqs"
128+
EAGER_SERVICE_LOADING = "1"
124129
```
125130

131+
Then run `lstk start` - the profiles are automatically applied to the container.
132+
126133
## Interactive And Non-Interactive Mode
127134

128135
`lstk` uses the TUI in an interactive terminal and plain output elsewhere. Use `--non-interactive` to force plain output even in a TTY:

internal/config/default_config.toml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,24 @@ port = "4566" # Host port the emulator will be accessible on
1313
# Environment profiles let you group environment variables and reference
1414
# them by name in one or more containers via the 'env' field above.
1515
#
16-
# Example variables based on commonly used current config options:
16+
# Example variables based on most used options:
1717
#
18-
# DEBUG=1 - Enable verbose logging
19-
# PERSISTENCE=1 - Persist LocalStack state across restarts
20-
# ENFORCE_IAM=1 - Enable IAM enforcement
18+
# DEBUG=1 - Enable verbose logging
19+
# PERSISTENCE=1 - Persist LocalStack state across restarts
20+
# ENFORCE_IAM=1 - Enable IAM policy enforcement
21+
# SERVICES=s3,sqs - Limit services to load (faster startup)
22+
# EAGER_SERVICE_LOADING=1 - Start services at startup (good for CI)
2123
#
2224
# See full list of configuration options:
2325
# > https://docs.localstack.cloud/references/configuration/
2426
#
25-
# Example:
27+
# Example profiles:
2628
#
2729
# [env.debug]
2830
# DEBUG = "1"
29-
#
30-
# [env.persist]
3131
# PERSISTENCE = "1"
32-
#
33-
# [env.security]
3432
# ENFORCE_IAM = "1"
33+
#
34+
# [env.ci]
35+
# SERVICES = "s3,sqs"
36+
# EAGER_SERVICE_LOADING = "1"

0 commit comments

Comments
 (0)