-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinteg.valheim.ts
40 lines (37 loc) · 904 Bytes
/
integ.valheim.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import {
App,
Stack,
aws_ecs as ecs,
} from 'aws-cdk-lib';
import { ValheimWorld } from './index';
const env = {
account: process.env.CDK_DEFAULT_ACCOUNT,
region: process.env.CDK_DEFAULT_REGION,
};
const app = new App();
const stack = new Stack(app, 'ValheimStack', { env });
new ValheimWorld(stack, 'ValheimWorld', {
image: ecs.ContainerImage.fromRegistry('mbround18/valheim'),
containerPath: '/home/steam/.config/unity3d/IronGate/Valheim',
// Warning: It's UTC.
schedules: [{
start: { hour: '12', weekDay: '1-4' },
stop: { hour: '1', weekDay: '1-4' },
},
// It's friday night ;)
{
start: { hour: '12', weekDay: '5' },
stop: { hour: '4', weekDay: '5' },
},
// It's weekend.
{
start: { weekDay: '6' },
stop: { weekDay: '1' },
}],
environment: {
PORT: '2456',
NAME: 'CDK Valheim',
WORLD: 'Amazon',
PASSWORD: 'fargate',
},
});