diff --git a/.elasticbeanstalk/config.yml b/.elasticbeanstalk/config.yml index 913fb2593c3..3a0cb15bbc9 100644 --- a/.elasticbeanstalk/config.yml +++ b/.elasticbeanstalk/config.yml @@ -1,8 +1,8 @@ branch-defaults: dev: - environment: wire-webapp-dev + environment: wire-webapp-dev-al2 master: - environment: wire-webapp-master + environment: wire-webapp-master-al2 deploy: artifact: server/dist/s3/ebs.zip global: diff --git a/.github/workflows/deploy-to-test-env.yml b/.github/workflows/deploy-to-test-env.yml index b6645234b65..11a9f31436b 100644 --- a/.github/workflows/deploy-to-test-env.yml +++ b/.github/workflows/deploy-to-test-env.yml @@ -8,9 +8,9 @@ on: required: true type: choice options: - - wire-webapp-qa - - wire-webapp-edge - - wire-webapp-mls + - wire-webapp-qa-al2-migration + - wire-webapp-edge-al2 + - wire-webapp-mls-al2 concurrency: group: ci-${{ github.ref }} diff --git a/.github/workflows/test_build_deploy.yml b/.github/workflows/test_build_deploy.yml index f4a4279a1e6..0071a08918d 100644 --- a/.github/workflows/test_build_deploy.yml +++ b/.github/workflows/test_build_deploy.yml @@ -93,9 +93,9 @@ jobs: key: '${{github.ref}}' map: | { - "edge": { "dev_env": "wire-webapp-edge" }, - "dev": { "dev_env": "wire-webapp-dev" }, - "master": { "dev_env": "wire-webapp-master" } + "edge": { "dev_env": "wire-webapp-edge-al2" }, + "dev": { "dev_env": "wire-webapp-dev-al2" }, + "master": { "dev_env": "wire-webapp-master-al2" } } - uses: kanga333/variable-mapper@master @@ -104,8 +104,8 @@ jobs: key: '${{env.TAG}}' map: | { - "production": { "prod_env": "wire-webapp-prod" }, - "staging": { "prod_env": "wire-webapp-staging" } + "production": { "prod_env": "wire-webapp-prod-al2" }, + "staging": { "prod_env": "wire-webapp-staging-al2" } } - name: Build diff --git a/Procfile b/Procfile new file mode 100644 index 00000000000..e6bad1f0136 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: npm run start:prod \ No newline at end of file diff --git a/bin/zip.js b/bin/zip.js index 129a320fd6e..01e1a0b9233 100644 --- a/bin/zip.js +++ b/bin/zip.js @@ -29,9 +29,12 @@ const S3_PATH = path.resolve(ROOT_PATH, 'server/dist/s3'); archive.file(path.join(SERVER_PATH, 'package.json'), {name: 'package.json'}); archive.file(path.join(ROOT_PATH, '.env.defaults'), {name: '.env.defaults'}); +archive.file(path.join(ROOT_PATH, 'Procfile'), {name: 'Procfile'}); archive.directory(DIST_PATH, false); -fs.mkdirSync(S3_PATH); +if (!fs.existsSync(S3_PATH)) { + fs.mkdirSync(S3_PATH); +} const output = fs.createWriteStream(path.join(S3_PATH, 'ebs.zip')); archive.pipe(output); diff --git a/server/.ebextensions/00-environment.config b/server/.ebextensions/00-environment.config index 0e273cca127..26ec1fb5539 100644 --- a/server/.ebextensions/00-environment.config +++ b/server/.ebextensions/00-environment.config @@ -1,5 +1,3 @@ option_settings: - aws:elasticbeanstalk:container:nodejs: - GzipCompression: true - NodeCommand: "npm run start:prod" - ProxyServer: nginx + aws:elasticbeanstalk:environment:proxy: + ProxyServer: nginx \ No newline at end of file diff --git a/server/.platform/nginx/conf.d/proxy.conf b/server/.platform/nginx/conf.d/proxy.conf new file mode 100644 index 00000000000..19f3ec026c8 --- /dev/null +++ b/server/.platform/nginx/conf.d/proxy.conf @@ -0,0 +1,7 @@ +large_client_header_buffers 4 32k; +fastcgi_buffers 16 32k; +fastcgi_buffer_size 32k; +proxy_buffer_size 128k; +proxy_buffers 4 256k; +proxy_busy_buffers_size 256k; +server_tokens off; \ No newline at end of file