@glicogh/healthcare-cdk 0.1.69 → 0.1.71
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,12 +1,3 @@
|
|
|
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
|
|
9
|
-
|
|
10
1
|
# install certbot
|
|
11
2
|
sudo snap install core
|
|
12
3
|
sudo snap refresh core
|
|
@@ -15,18 +6,20 @@ sudo snap install --classic certbot
|
|
|
15
6
|
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
16
7
|
|
|
17
8
|
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
18
|
-
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt
|
|
19
|
-
sudo chown -R ubuntu:ubuntu /etc/letsencrypt
|
|
9
|
+
aws s3 cp s3://$public_bucket_name/ssl/{{$serviceName}} /etc/letsencrypt --recursive
|
|
10
|
+
sudo chown -R ubuntu:ubuntu /etc/letsencrypt
|
|
20
11
|
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
# install nginx
|
|
13
|
+
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
|
|
14
|
+
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
|
15
|
+
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
|
|
16
|
+
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
|
|
17
|
+
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
|
|
18
|
+
sudo apt update -yq
|
|
19
|
+
sudo apt install nginx nodejs dnsmasq supervisor -yq
|
|
25
20
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
29
|
-
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
21
|
+
# test certbot with dry-run to ensure it can successfully obtain a certificate for the API Gateway domain name (will not actually obtain a certificate due to --dry-run flag). This would also create the necessary nginx configuration for certbot to use during the real certificate obtaining process.
|
|
22
|
+
sudo certbot certonly --nginx -d $api_gateway_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --dry-run
|
|
30
23
|
|
|
31
24
|
# copy appropriate server_name.conf based on env
|
|
32
25
|
cat $service_dir/nginx/microservices/server_name.{{envName}}.conf | sudo tee $service_dir/nginx/microservices/server_name.conf
|
|
@@ -54,3 +47,13 @@ sudo systemctl restart dnsmasq
|
|
|
54
47
|
|
|
55
48
|
# start nginx server
|
|
56
49
|
sudo systemctl restart nginx
|
|
50
|
+
|
|
51
|
+
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket.
|
|
52
|
+
if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; then
|
|
53
|
+
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 s3://$public_bucket_name/ssl/{{serviceName}}/"
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
# register SSL renewal cron
|
|
57
|
+
certbot_cron_command="/usr/bin/certbot renew --deploy-hook \"aws s3 sync /etc/letsencrypt s3://$public_bucket_name/ssl/{{serviceName}}/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
58
|
+
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
59
|
+
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
@@ -1,12 +1,3 @@
|
|
|
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
|
|
9
|
-
|
|
10
1
|
# install certbot
|
|
11
2
|
sudo snap install core
|
|
12
3
|
sudo snap refresh core
|
|
@@ -15,18 +6,20 @@ sudo snap install --classic certbot
|
|
|
15
6
|
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
16
7
|
|
|
17
8
|
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
18
|
-
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt
|
|
19
|
-
sudo chown -R ubuntu:ubuntu /etc/letsencrypt
|
|
9
|
+
aws s3 cp s3://$public_bucket_name/ssl/{{$serviceName}}/ /etc/letsencrypt --recursive
|
|
10
|
+
sudo chown -R ubuntu:ubuntu /etc/letsencrypt
|
|
20
11
|
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
# install nginx
|
|
13
|
+
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
|
|
14
|
+
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
|
15
|
+
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
|
|
16
|
+
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
|
|
17
|
+
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
|
|
18
|
+
sudo apt update -yq
|
|
19
|
+
sudo apt install nginx npm -yq
|
|
25
20
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
29
|
-
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
21
|
+
# test certbot with dry-run to ensure it can successfully obtain a certificate for the Portal domain name (will not actually obtain a certificate due to --dry-run flag). This would also create the necessary nginx configuration for certbot to use during the real certificate obtaining process.
|
|
22
|
+
sudo certbot certonly --nginx -d $portal_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --dry-run
|
|
30
23
|
|
|
31
24
|
cd $service_dir
|
|
32
25
|
|
|
@@ -53,3 +46,13 @@ sudo NODE_OPTIONS="--max-old-space-size=2048 NUXT_TELEMETRY_DISABLED=1" npm run
|
|
|
53
46
|
|
|
54
47
|
# start nginx server
|
|
55
48
|
sudo systemctl restart nginx
|
|
49
|
+
|
|
50
|
+
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
51
|
+
if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
|
|
52
|
+
sudo certbot certonly --nginx -d $portal_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --deploy-hook "aws s3 sync /etc/letsencrypt s3://$public_bucket_name/ssl/{{serviceName}}/"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# register SSL renewal cron
|
|
56
|
+
certbot_cron_command="/usr/bin/certbot renew --deploy-hook \"aws s3 sync /etc/letsencrypt s3://$public_bucket_name/ssl/{{serviceName}}/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
57
|
+
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
58
|
+
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
package/package.json
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
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
|
|
9
|
-
|
|
10
1
|
# install certbot
|
|
11
2
|
sudo snap install core
|
|
12
3
|
sudo snap refresh core
|
|
@@ -15,18 +6,20 @@ sudo snap install --classic certbot
|
|
|
15
6
|
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
16
7
|
|
|
17
8
|
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
18
|
-
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt
|
|
19
|
-
sudo chown -R ubuntu:ubuntu /etc/letsencrypt
|
|
9
|
+
aws s3 cp s3://$public_bucket_name/ssl/{{$serviceName}} /etc/letsencrypt --recursive
|
|
10
|
+
sudo chown -R ubuntu:ubuntu /etc/letsencrypt
|
|
20
11
|
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
# install nginx
|
|
13
|
+
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
|
|
14
|
+
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
|
15
|
+
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
|
|
16
|
+
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
|
|
17
|
+
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
|
|
18
|
+
sudo apt update -yq
|
|
19
|
+
sudo apt install nginx nodejs dnsmasq supervisor -yq
|
|
25
20
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
29
|
-
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
21
|
+
# test certbot with dry-run to ensure it can successfully obtain a certificate for the API Gateway domain name (will not actually obtain a certificate due to --dry-run flag). This would also create the necessary nginx configuration for certbot to use during the real certificate obtaining process.
|
|
22
|
+
sudo certbot certonly --nginx -d $api_gateway_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --dry-run
|
|
30
23
|
|
|
31
24
|
# copy appropriate server_name.conf based on env
|
|
32
25
|
cat $service_dir/nginx/microservices/server_name.{{envName}}.conf | sudo tee $service_dir/nginx/microservices/server_name.conf
|
|
@@ -54,3 +47,13 @@ sudo systemctl restart dnsmasq
|
|
|
54
47
|
|
|
55
48
|
# start nginx server
|
|
56
49
|
sudo systemctl restart nginx
|
|
50
|
+
|
|
51
|
+
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket.
|
|
52
|
+
if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; then
|
|
53
|
+
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 s3://$public_bucket_name/ssl/{{serviceName}}/"
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
# register SSL renewal cron
|
|
57
|
+
certbot_cron_command="/usr/bin/certbot renew --deploy-hook \"aws s3 sync /etc/letsencrypt s3://$public_bucket_name/ssl/{{serviceName}}/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
58
|
+
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
59
|
+
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
@@ -1,12 +1,3 @@
|
|
|
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
|
|
9
|
-
|
|
10
1
|
# install certbot
|
|
11
2
|
sudo snap install core
|
|
12
3
|
sudo snap refresh core
|
|
@@ -15,18 +6,20 @@ sudo snap install --classic certbot
|
|
|
15
6
|
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
16
7
|
|
|
17
8
|
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
18
|
-
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt
|
|
19
|
-
sudo chown -R ubuntu:ubuntu /etc/letsencrypt
|
|
9
|
+
aws s3 cp s3://$public_bucket_name/ssl/{{$serviceName}}/ /etc/letsencrypt --recursive
|
|
10
|
+
sudo chown -R ubuntu:ubuntu /etc/letsencrypt
|
|
20
11
|
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
# install nginx
|
|
13
|
+
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
|
|
14
|
+
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
|
15
|
+
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
|
|
16
|
+
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
|
|
17
|
+
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
|
|
18
|
+
sudo apt update -yq
|
|
19
|
+
sudo apt install nginx npm -yq
|
|
25
20
|
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
29
|
-
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
21
|
+
# test certbot with dry-run to ensure it can successfully obtain a certificate for the Portal domain name (will not actually obtain a certificate due to --dry-run flag). This would also create the necessary nginx configuration for certbot to use during the real certificate obtaining process.
|
|
22
|
+
sudo certbot certonly --nginx -d $portal_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --dry-run
|
|
30
23
|
|
|
31
24
|
cd $service_dir
|
|
32
25
|
|
|
@@ -53,3 +46,13 @@ sudo NODE_OPTIONS="--max-old-space-size=2048 NUXT_TELEMETRY_DISABLED=1" npm run
|
|
|
53
46
|
|
|
54
47
|
# start nginx server
|
|
55
48
|
sudo systemctl restart nginx
|
|
49
|
+
|
|
50
|
+
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
51
|
+
if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
|
|
52
|
+
sudo certbot certonly --nginx -d $portal_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --deploy-hook "aws s3 sync /etc/letsencrypt s3://$public_bucket_name/ssl/{{serviceName}}/"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# register SSL renewal cron
|
|
56
|
+
certbot_cron_command="/usr/bin/certbot renew --deploy-hook \"aws s3 sync /etc/letsencrypt s3://$public_bucket_name/ssl/{{serviceName}}/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
57
|
+
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
58
|
+
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|