Skip to content

Commit 3a74792

Browse files
committed
update: Pulumi configuration and ECS options
1 parent d35ee49 commit 3a74792

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

infrastructure/Pulumi.production.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
config:
22
aws:region: ap-northeast-2
33
velog:DOCKER_ENV: production
4-
velog:target: cron
4+
velog:target: cron,server

infrastructure/src/common/ecs.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ export const createECSfargateService = ({
4646
container: {
4747
// name: withPrefix(`${packageType}-container`),
4848
image: imageUri,
49-
cpu: option.cpu,
50-
memory: option.memory,
51-
memoryReservation: option.memoryReservation,
49+
cpu: option.containerCpu,
50+
memory: option.containerMemory,
5251
essential: true,
5352
portMappings: [{ targetGroup: targetGroup }],
5453
environment: [

infrastructure/src/lib/ecsOptions.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,24 @@ import { ENV } from '../env'
22

33
const webEcsOption: EcsOption = {
44
desiredCount: ENV.isProduction ? 2 : 1,
5-
cpu: ENV.isProduction ? 1024 : 512,
6-
memory: ENV.isProduction ? 2048 : 1024,
7-
memoryReservation: 512,
5+
containerCpu: ENV.isProduction ? 1024 : 512,
6+
containerMemory: ENV.isProduction ? 2048 : 1024,
87
maxCapacity: 12,
98
minCapacity: ENV.isProduction ? 2 : 1,
109
}
1110

1211
const serverEcsOption: EcsOption = {
1312
desiredCount: ENV.isProduction ? 2 : 1,
14-
cpu: ENV.isProduction ? 1024 * 0.75 : 512,
15-
memory: 1024,
16-
memoryReservation: 512,
13+
containerCpu: ENV.isProduction ? 1024 : 512,
14+
containerMemory: 1024,
1715
maxCapacity: 12,
1816
minCapacity: ENV.isProduction ? 2 : 1,
1917
}
2018

2119
const cronEcsOption: EcsOption = {
2220
desiredCount: ENV.isProduction ? 1 : 0,
23-
cpu: ENV.isProduction ? 1024 : 512,
24-
memory: 512,
25-
memoryReservation: 512,
21+
containerCpu: ENV.isProduction ? 1024 : 512,
22+
containerMemory: 512,
2623
maxCapacity: 1,
2724
minCapacity: ENV.isProduction ? 1 : 0,
2825
}
@@ -35,9 +32,8 @@ export const ecsOption = {
3532

3633
type EcsOption = {
3734
desiredCount: number
38-
cpu: number
39-
memory: number
40-
memoryReservation: number
35+
containerCpu: number
36+
containerMemory: number
4137
maxCapacity: number
4238
minCapacity: number
4339
}

packages/velog-server/src/lib/discord/DiscordService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class DiscordService {
3030
'canceling statement',
3131
'Not allow origin',
3232
'Unknown query',
33+
'Code is required',
3334
]
3435
const isFrequentWordIncluded = frequentWord.some((word) => message.includes(word))
3536

0 commit comments

Comments
 (0)