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
new ValheimWorld(stack, 'ValheimWorld', {
cpu: 2048,
memoryLimitMiB: 4096,
schedules: [{
start: { hour: '12', weekDay: '1-5' },
stop: { hour: '1', weekDay: '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.22.tar.gz
(387.0 kB
view hashes)
Built Distribution
cdk_valheim-0.0.22-py3-none-any.whl
(385.4 kB
view hashes)
Close
Hashes for cdk_valheim-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80c7b9cfbaf3bbd9359d97884be2b05e02861b152ab37b8eb4f1e8ec4c67109c |
|
MD5 | 6b46f13588e56b4a17b35fba2ba89c10 |
|
BLAKE2b-256 | d91f5ac4fe2f55d5489d755d7c5798d3b72abef17ec41e6e3bed54b8d4063e8b |