From 861e34adc51ba6847003cdc644b3e940cf899bac Mon Sep 17 00:00:00 2001 From: ayuki_j <19406594+ayuki-joto@users.noreply.github.com> Date: Mon, 29 Jan 2024 00:44:28 +0900 Subject: [PATCH] refactor: update command --- lib/decidim-stack.ts | 5 +++++ test/__snapshots__/decidim-cfj-cdk.test.ts.snap | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/decidim-stack.ts b/lib/decidim-stack.ts index c48fc4a..ed9e08d 100644 --- a/lib/decidim-stack.ts +++ b/lib/decidim-stack.ts @@ -183,6 +183,11 @@ export class DecidimStack extends cdk.Stack { }), streamPrefix: 'app' }), + command: [ + 'sh', + '-c', + 'bundle exec rails db:create; bundle exec rake db:migrate && rails s -b 0.0.0.0' + ], healthCheck: { command: [ 'CMD-SHELL', diff --git a/test/__snapshots__/decidim-cfj-cdk.test.ts.snap b/test/__snapshots__/decidim-cfj-cdk.test.ts.snap index f55f652..252cbdc 100644 --- a/test/__snapshots__/decidim-cfj-cdk.test.ts.snap +++ b/test/__snapshots__/decidim-cfj-cdk.test.ts.snap @@ -1345,6 +1345,11 @@ exports[`DecidimStack Created 1`] = ` ], }, { + "Command": [ + "sh", + "-c", + "bundle exec rails db:create; bundle exec rake db:migrate && rails s -b 0.0.0.0", + ], "Environment": [ { "Name": "AWS_CLOUD_FRONT_END_POINT",