diff --git a/nightly-playground/lib/routing.ts b/nightly-playground/lib/routing.ts index 48f2ec3..ce03098 100644 --- a/nightly-playground/lib/routing.ts +++ b/nightly-playground/lib/routing.ts @@ -116,7 +116,8 @@ export class Routing extends Stack { proxy_set_header X-Forwarded-Proto $scheme; # Set the X-Forwarded-Proto header } }`), - InitFile.fromFileInline('/usr/share/nginx/html/index.html', join(__dirname, '../resources/assets/ngnix-index.html')), + InitFile.fromFileInline('/usr/share/nginx/html/index_nightly.html', join(__dirname, '../resources/assets/ngnix-index.html')), + InitCommand.shellCommand('cp /usr/share/nginx/html/index_nightly.html /usr/share/nginx/html/index.html'), InitCommand.shellCommand('sudo systemctl start nginx'), InitCommand.shellCommand('sudo systemctl enable nginx'), ]; diff --git a/nightly-playground/test/nightly-playground.test.ts b/nightly-playground/test/nightly-playground.test.ts index 153f816..d85f003 100644 --- a/nightly-playground/test/nightly-playground.test.ts +++ b/nightly-playground/test/nightly-playground.test.ts @@ -301,9 +301,12 @@ test('ngnix load balancer and ASG resources', () => { command: "openssl req -x509 -nodes -newkey rsa:4096 -keyout /etc/nginx/cert.key -out /etc/nginx/cert.crt -days 365 -subj '/CN=SH'", }, '002': { - command: 'sudo systemctl start nginx', + command: 'cp /usr/share/nginx/html/index_nightly.html /usr/share/nginx/html/index.html', }, '003': { + command: 'sudo systemctl start nginx', + }, + '004': { command: 'sudo systemctl enable nginx', }, },