[variables]
valkey_password = "${password:32}"

[config]
env = [
  "VALKEY_PASSWORD=${valkey_password}"
]
mounts = []

[[config.mounts]]
filePath = "valkey.conf"
content = """
# Valkey configuration file
# For more information, see: https://github.com/valkey-io/valkey

# Network
bind 0.0.0.0
port 6379
protected-mode yes

# General
daemonize no
supervised no
pidfile /data/valkey.pid
loglevel notice
logfile ""

# Snapshotting
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /data

# Replication
replica-serve-stale-data yes
replica-read-only yes

# Security
requirepass ${valkey_password}

# Memory management
maxmemory-policy noeviction

# Append only file
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
"""

