Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update decidim v0.28 #55

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/decidim-cfj-cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Tags } from 'aws-cdk-lib';

const app = new cdk.App();

const stages = ['dev', 'staging', 'prd-v0274']
const stages = ['dev', 'staging', 'prd-v0274', 'dev-v028']
const stage = app.node.tryGetContext('stage')
const tag = app.node.tryGetContext('tag')
if (!stages.includes(stage)) {
Expand Down
20 changes: 10 additions & 10 deletions config/prd-v0265.json → config/dev-v028.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"rds": {
"snapshot": true,
"snapshotIdentifier": "decidim-master-2023-04-03",
"instanceType": "t2.medium",
"deletionProtection": true,
"snapshotIdentifier": "decidim-master-2024-08-27",
"instanceType": "t3.micro",
"deletionProtection": false,
"allocatedStorage": 20,
"maxAllocatedStorage": 40,
"enablePerformanceInsights": true,
"multiAz": true
"enablePerformanceInsights": false,
"multiAz": false
},

"aws": {
Expand All @@ -17,9 +17,8 @@

"cacheNodeType": "cache.t2.micro",
"engineVersion": "6.x",
"numCacheNodes": 3,
"automaticFailoverEnabled": true,

"numCacheNodes": 1,
"automaticFailoverEnabled": false,
"ecs": {
"smtpDomain": "diycities.jp",
"repository": "decidim-cfj",
Expand All @@ -28,11 +27,12 @@
"arn:aws:acm:ap-northeast-1:887442827229:certificate/b02c7415-d6f8-4794-994e-fe5689ca7b74"
],
"fargateSpotCapacityProvider": {
"base": 1,
"weight": 1
},
"fargateCapacityProvider": {
"base": 1,
"weight": 2
"base": 0,
"weight": 1
}
},

Expand Down
4 changes: 2 additions & 2 deletions docs/build_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ $ npx cdk --context stage=dev tag=${IMAGE_TAG} --profile decidim bootstrap
どんなリソースが作成されるのかを確認できる。

```console
$ npx cdk --context stage=dev tag=${IMAGE_TAG} --profile decidim diff
$ npx cdk --context stage=dev -c tag=${IMAGE_TAG} --profile decidim diff
```

## 6-3. デプロイ実行

```console
$ npx cdk --context stage=dev tag=${IMAGE_TAG} --profile decidim deploy --all --require-approval never
$ npx cdk --context stage=dev -c tag=${IMAGE_TAG} --profile decidim deploy --all --require-approval never
```

上記コマンドが成功すれば、デプロイは成功です。
Expand Down
5 changes: 5 additions & 0 deletions lib/decidim-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,11 @@ export class DecidimStack extends cdk.Stack {
id: 'MailDigestWeekly',
command: ['bundle','exec', 'rake', 'decidim:mailers:notifications_digest_weekly'],
scheduleExpression: 'cron(0 19 ? * 6 *)'
},
{
id: 'UpdateActiveStep',
command: ['bundle','exec', 'rake', 'decidim_participatory_processes:change_active_step'],
scheduleExpression: 'cron(*/15 * * * ? *)'
}
]

Expand Down
56 changes: 56 additions & 0 deletions test/__snapshots__/decidim-cfj-cdk.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,62 @@ exports[`DecidimStack Created 1`] = `
},
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
},
"UpdateActiveStep02E91CED": {
"Properties": {
"ScheduleExpression": "cron(*/15 * * * ? *)",
"State": "ENABLED",
"Targets": [
{
"Arn": {
"Fn::GetAtt": [
"DecidimCluster7E0E2A4C",
"Arn",
],
},
"EcsParameters": {
"LaunchType": "FARGATE",
"NetworkConfiguration": {
"AwsVpcConfiguration": {
"AssignPublicIp": "DISABLED",
"SecurityGroups": [
{
"Fn::GetAtt": [
"decidimTaskDefinitionSecurityGroup7C75DD43",
"GroupId",
],
},
],
"Subnets": [
{
"Fn::ImportValue": "stagingdecidimNetworkStack:ExportsOutputRefVpcpublicSubnet1Subnet2BB74ED74EB42ADC",
},
{
"Fn::ImportValue": "stagingdecidimNetworkStack:ExportsOutputRefVpcpublicSubnet2SubnetE34B022AC8BB6627",
},
{
"Fn::ImportValue": "stagingdecidimNetworkStack:ExportsOutputRefVpcpublicSubnet3SubnetDFEF064A56C3647E",
},
],
},
},
"TaskCount": 1,
"TaskDefinitionArn": {
"Ref": "decidimTaskDefinition2308FB5B",
},
},
"Id": "Target0",
"Input": "{"containerOverrides":[{"name":"appContainer","command":["bundle","exec","rake","decidim_participatory_processes:change_active_step"]}]}",
"RoleArn": {
"Fn::GetAtt": [
"decidimTaskDefinitionEventsRole6CB2B894",
"Arn",
],
},
},
],
},
"Type": "AWS::Events::Rule",
},
"addARecordA6D3D93D": {
"DeletionPolicy": "Delete",
"DependsOn": [
Expand Down
Loading