@glicogh/healthcare-cdk 0.1.68 → 0.1.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,11 @@
1
+ # install nginx
2
+ sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
3
+ curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
4
+ gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
5
+ echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
6
+ echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
7
+ sudo apt update -yq
8
+ sudo apt install nginx nodejs dnsmasq supervisor -yq
1
9
 
2
10
  # install certbot
3
11
  sudo snap install core
@@ -10,7 +18,7 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot
10
18
  aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
11
19
  sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
12
20
 
13
- # obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
21
+ # obtain SSL certificate (if it doesn't exist) and sync to S3 bucket. Intentionally doing this before configuring nginx to ensure that the certificate is available in S3 for other API Gateway instances to sync from (if applicable) and to avoid nginx configuration issues due to missing certificate files.
14
22
  if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; then
15
23
  sudo certbot certonly --nginx -d $api_gateway_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --deploy-hook "aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/"
16
24
  fi
@@ -20,15 +28,6 @@ certbot_cron_command="/usr/bin/certbot renew --deploy-hook \"aws s3 sync /etc/le
20
28
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
21
29
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
22
30
 
23
- # install nginx
24
- sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
25
- curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
26
- gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
27
- echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
28
- echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
29
- sudo apt update -yq
30
- sudo apt install nginx nodejs dnsmasq supervisor -yq
31
-
32
31
  # copy appropriate server_name.conf based on env
33
32
  cat $service_dir/nginx/microservices/server_name.{{envName}}.conf | sudo tee $service_dir/nginx/microservices/server_name.conf
34
33
 
@@ -1,3 +1,11 @@
1
+ # install nginx
2
+ sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
3
+ curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
4
+ gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
5
+ echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
6
+ echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
7
+ sudo apt update -yq
8
+ sudo apt install nginx npm -yq
1
9
 
2
10
  # install certbot
3
11
  sudo snap install core
@@ -20,15 +28,6 @@ certbot_cron_command="/usr/bin/certbot renew --deploy-hook \"aws s3 sync /etc/le
20
28
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
21
29
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
22
30
 
23
- # install nginx
24
- sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
25
- curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
26
- gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
27
- echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
28
- echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
29
- sudo apt update -yq
30
- sudo apt install nginx npm -yq
31
-
32
31
  cd $service_dir
33
32
 
34
33
  # create .env
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glicogh/healthcare-cdk",
3
- "version": "0.1.68",
3
+ "version": "0.1.69",
4
4
  "description": "CDK automations",
5
5
  "bin": {
6
6
  "cdk": "bin/cdk.js"
@@ -1,3 +1,11 @@
1
+ # install nginx
2
+ sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
3
+ curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
4
+ gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
5
+ echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
6
+ echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
7
+ sudo apt update -yq
8
+ sudo apt install nginx nodejs dnsmasq supervisor -yq
1
9
 
2
10
  # install certbot
3
11
  sudo snap install core
@@ -10,7 +18,7 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot
10
18
  aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
11
19
  sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
12
20
 
13
- # obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
21
+ # obtain SSL certificate (if it doesn't exist) and sync to S3 bucket. Intentionally doing this before configuring nginx to ensure that the certificate is available in S3 for other API Gateway instances to sync from (if applicable) and to avoid nginx configuration issues due to missing certificate files.
14
22
  if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; then
15
23
  sudo certbot certonly --nginx -d $api_gateway_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --deploy-hook "aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/"
16
24
  fi
@@ -20,15 +28,6 @@ certbot_cron_command="/usr/bin/certbot renew --deploy-hook \"aws s3 sync /etc/le
20
28
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
21
29
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
22
30
 
23
- # install nginx
24
- sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
25
- curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
26
- gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
27
- echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
28
- echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
29
- sudo apt update -yq
30
- sudo apt install nginx nodejs dnsmasq supervisor -yq
31
-
32
31
  # copy appropriate server_name.conf based on env
33
32
  cat $service_dir/nginx/microservices/server_name.{{envName}}.conf | sudo tee $service_dir/nginx/microservices/server_name.conf
34
33
 
@@ -1,3 +1,11 @@
1
+ # install nginx
2
+ sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
3
+ curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
4
+ gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
5
+ echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
6
+ echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
7
+ sudo apt update -yq
8
+ sudo apt install nginx npm -yq
1
9
 
2
10
  # install certbot
3
11
  sudo snap install core
@@ -20,15 +28,6 @@ certbot_cron_command="/usr/bin/certbot renew --deploy-hook \"aws s3 sync /etc/le
20
28
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
21
29
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
22
30
 
23
- # install nginx
24
- sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
25
- curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
26
- gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
27
- echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
28
- echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
29
- sudo apt update -yq
30
- sudo apt install nginx npm -yq
31
-
32
31
  cd $service_dir
33
32
 
34
33
  # create .env