cdk-valheim
Project description
cdk-valheim
A high level CDK construct of Valheim dedicated server.
Features
- Fargate cluster to run a Valheim server, with EFS for persistence (schedulable)
- Hourly AWS Backup with 3 days retention (customizable)
- lloesche/valheim-server as the default container image (replaceable)
See integration test for an example.
API Doc
See API.md
References
- On-demand, serverless Valheim server setup with AWS CDK, Discord Interactions and GitLab CI
- Grantapher/discord-cdk-valheim
Examples
The construct is published to both npm and PyPI.
TypeScript
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
ValheimWorld(stack, "ValheimWorld",
cpu=2048,
memory_limit_mi_b=4096,
schedules=[{
"start": {"hour": "12", "week_day": "1-5"},
"stop": {"hour": "1", "week_day": "1-5"}
}],
environment={
"SERVER_NAME": "CDK Valheim",
"WORLD_NAME": "Amazon",
"SERVER_PASS": "fargate",
"BACKUPS": "false"
}
)
Python
ValheimWorld(
self,
'ValheimWorld',
cpu=2048,
memory_limit_mib=4096,
schedules=[ValheimWorldScalingSchedule(
start=CronOptions(hour='12', week_day='1-5'),
stop=CronOptions(hour='1', week_day='1-5'),
)],
environment={
'SERVER_NAME': 'CDK Valheim',
'WORLD_NAME': 'Amazon',
'SERVER_PASS': 'fargate',
'BACKUPS': 'false',
})
Testing
- Unit test and snapshot test
npx projen test
- Integration test
npx cdk -a "npx ts-node src/integ.valheim.ts" diff
npx cdk -a "npx ts-node src/integ.valheim.ts" deploy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cdk-valheim-0.0.20.tar.gz
(415.0 kB
view hashes)
Built Distribution
cdk_valheim-0.0.20-py3-none-any.whl
(413.4 kB
view hashes)
Close
Hashes for cdk_valheim-0.0.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b2e6e431d5b79c33de82d528481be7ead96af6df8fd9568d212dd9fd61e9ae1 |
|
MD5 | a51cbfc0a6815a4c76ae5e6a6e5b719b |
|
BLAKE2b-256 | dbe976a7dd31f0cd1f68f4f1b7146d2b7b10894b5c28ea179f44997f28da0780 |