A high level CDK construct of Valheim dedicated server.
See integration test for an example.
See API.md
The construct is published to both npm and PyPI.
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',
},
});
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',
})
npx projen test
npx cdk -a "npx ts-node src/integ.valheim.ts" diff
npx cdk -a "npx ts-node src/integ.valheim.ts" deploy