Metadata-Version: 2.1
Name: cdk-valheim
Version: 0.0.14
Summary: cdk-valheim
Home-page: https://github.com/gotodeploy/cdk-valheim.git
Author: gotodeploy<1491134+gotodeploy@users.noreply.github.com>
License: Apache-2.0
Project-URL: Source, https://github.com/gotodeploy/cdk-valheim.git
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Typing :: Typed
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: aws-cdk.aws-applicationautoscaling (<2.0.0,>=1.91.0)
Requires-Dist: aws-cdk.aws-backup (<2.0.0,>=1.91.0)
Requires-Dist: aws-cdk.aws-ec2 (<2.0.0,>=1.91.0)
Requires-Dist: aws-cdk.aws-ecs (<2.0.0,>=1.91.0)
Requires-Dist: aws-cdk.aws-efs (<2.0.0,>=1.91.0)
Requires-Dist: aws-cdk.aws-events (<2.0.0,>=1.91.0)
Requires-Dist: aws-cdk.aws-logs (<2.0.0,>=1.91.0)
Requires-Dist: aws-cdk.core (<2.0.0,>=1.91.0)
Requires-Dist: constructs (<4.0.0,>=3.2.27)
Requires-Dist: jsii (<2.0.0,>=1.21.0)
Requires-Dist: publication (>=0.0.3)

![GitHub Workflow Status](https://img.shields.io/github/workflow/status/gotodeploy/cdk-valheim/Build) [![GitHub license](https://img.shields.io/github/license/gotodeploy/cdk-valheim)](https://github.com/gotodeploy/cdk-valheim/blob/main/LICENSE) ![npm](https://img.shields.io/npm/dw/cdk-valheim?label=npm) ![PyPI - Downloads](https://img.shields.io/pypi/dw/cdk-valheim?label=PyPI)

# cdk-valheim

A high level CDK construct of [Valheim](https://www.valheimgame.com/) 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](https://github.com/lloesche/valheim-server-docker) as the default container image (replaceable)

See [integration test](src/integ.valheim.ts) for an example.

## API Doc

See [API.md](API.md)

## Examples

The construct is published to both npm and PyPI.

* TypeScript

```python
# 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

```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

```sh
npx projen test
```

* Integration test

```sh
npx cdk -a "npx ts-node src/integ.valheim.ts" diff
npx cdk -a "npx ts-node src/integ.valheim.ts" deploy
```


