Skip to main content

cdk-valheim

Project description

GitHub Workflow Status GitHub license npm PyPI - Downloads

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

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


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.26.tar.gz (388.8 kB view hashes)

Uploaded Source

Built Distribution

cdk_valheim-0.0.26-py3-none-any.whl (387.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page