@glicogh/healthcare-cdk 0.1.65 → 0.1.66
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,24 @@
|
|
|
1
|
+
|
|
2
|
+
# install certbot
|
|
3
|
+
sudo snap refresh core
|
|
4
|
+
sudo apt remove certbot
|
|
5
|
+
sudo snap install --classic certbot
|
|
6
|
+
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
7
|
+
|
|
8
|
+
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
9
|
+
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
|
|
10
|
+
sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
|
|
11
|
+
|
|
12
|
+
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
13
|
+
if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; then
|
|
14
|
+
sudo certbot certonly --standalone -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/"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# register SSL renewal cron
|
|
18
|
+
certbot_cron_command="/usr/bin/certbot renew --pre-hook=\"sudo systemctl stop nginx\" --post-hook=\"sudo systemctl start nginx\" --deploy-hook \"aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
19
|
+
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
20
|
+
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
21
|
+
|
|
1
22
|
# install nginx
|
|
2
23
|
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
|
|
3
24
|
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
|
@@ -22,26 +43,6 @@ echo "conf-dir=/etc/dnsmasq.d/,*.conf" | sudo tee -a /etc/dnsmasq.conf
|
|
|
22
43
|
echo "conf-dir=$service_dir/dnsmasq/conf.d/,*.conf" | sudo tee -a /etc/dnsmasq.conf
|
|
23
44
|
echo "port=5353" | sudo tee -a /etc/dnsmasq.conf
|
|
24
45
|
|
|
25
|
-
# install certbot
|
|
26
|
-
sudo snap refresh core
|
|
27
|
-
sudo apt remove certbot
|
|
28
|
-
sudo snap install --classic certbot
|
|
29
|
-
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
30
|
-
|
|
31
|
-
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
32
|
-
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
|
|
33
|
-
sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
|
|
34
|
-
|
|
35
|
-
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
36
|
-
if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; then
|
|
37
|
-
sudo certbot certonly --standalone -d $api_gateway_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --pre-hook="sudo systemctl stop nginx" --post-hook="sudo systemctl start nginx" --deploy-hook "aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/"
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
# register SSL renewal cron
|
|
41
|
-
certbot_cron_command="/usr/bin/certbot renew --pre-hook=\"sudo systemctl stop nginx\" --deploy-hook \"aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
42
|
-
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
43
|
-
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
44
|
-
|
|
45
46
|
# configure supervisor
|
|
46
47
|
sudo sed -i "s|files = .*|files = /etc/supervisor/conf.d/*.conf ${service_dir}/supervisor/conf.d/*.conf|" /etc/supervisor/supervisord.conf
|
|
47
48
|
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
# install certbot
|
|
3
|
+
sudo snap refresh core
|
|
4
|
+
sudo apt remove certbot
|
|
5
|
+
sudo snap install --classic certbot
|
|
6
|
+
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
7
|
+
|
|
8
|
+
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
9
|
+
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
|
|
10
|
+
sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
|
|
11
|
+
|
|
12
|
+
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
13
|
+
if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
|
|
14
|
+
sudo certbot certonly --standalone -d $portal_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/"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# register SSL renewal cron
|
|
18
|
+
certbot_cron_command="/usr/bin/certbot renew --pre-hook=\"sudo systemctl stop nginx\" --post-hook=\"sudo systemctl start nginx\" --deploy-hook \"aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
19
|
+
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
20
|
+
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
21
|
+
|
|
1
22
|
# install nginx
|
|
2
23
|
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
|
|
3
24
|
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
|
@@ -30,25 +51,5 @@ cd $service_dir
|
|
|
30
51
|
sudo npm i
|
|
31
52
|
sudo NODE_OPTIONS="--max-old-space-size=2048 NUXT_TELEMETRY_DISABLED=1" npm run generate
|
|
32
53
|
|
|
33
|
-
# install certbot
|
|
34
|
-
sudo snap refresh core
|
|
35
|
-
sudo apt remove certbot
|
|
36
|
-
sudo snap install --classic certbot
|
|
37
|
-
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
38
|
-
|
|
39
|
-
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
40
|
-
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
|
|
41
|
-
sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
|
|
42
|
-
|
|
43
|
-
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
44
|
-
if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
|
|
45
|
-
sudo certbot certonly --standalone -d $portal_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --pre-hook="sudo systemctl stop nginx" --deploy-hook "aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/"
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
# register SSL renewal cron
|
|
49
|
-
certbot_cron_command="/usr/bin/certbot renew --pre-hook=\"sudo systemctl stop nginx\" --post-hook=\"sudo systemctl start nginx\" --deploy-hook \"aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
50
|
-
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
51
|
-
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
52
|
-
|
|
53
54
|
# start nginx server
|
|
54
55
|
sudo systemctl restart nginx
|
package/package.json
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
# install certbot
|
|
3
|
+
sudo snap refresh core
|
|
4
|
+
sudo apt remove certbot
|
|
5
|
+
sudo snap install --classic certbot
|
|
6
|
+
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
7
|
+
|
|
8
|
+
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
9
|
+
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
|
|
10
|
+
sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
|
|
11
|
+
|
|
12
|
+
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
13
|
+
if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; then
|
|
14
|
+
sudo certbot certonly --standalone -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/"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# register SSL renewal cron
|
|
18
|
+
certbot_cron_command="/usr/bin/certbot renew --pre-hook=\"sudo systemctl stop nginx\" --post-hook=\"sudo systemctl start nginx\" --deploy-hook \"aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
19
|
+
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
20
|
+
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
21
|
+
|
|
1
22
|
# install nginx
|
|
2
23
|
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
|
|
3
24
|
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
|
@@ -22,26 +43,6 @@ echo "conf-dir=/etc/dnsmasq.d/,*.conf" | sudo tee -a /etc/dnsmasq.conf
|
|
|
22
43
|
echo "conf-dir=$service_dir/dnsmasq/conf.d/,*.conf" | sudo tee -a /etc/dnsmasq.conf
|
|
23
44
|
echo "port=5353" | sudo tee -a /etc/dnsmasq.conf
|
|
24
45
|
|
|
25
|
-
# install certbot
|
|
26
|
-
sudo snap refresh core
|
|
27
|
-
sudo apt remove certbot
|
|
28
|
-
sudo snap install --classic certbot
|
|
29
|
-
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
30
|
-
|
|
31
|
-
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
32
|
-
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
|
|
33
|
-
sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
|
|
34
|
-
|
|
35
|
-
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
36
|
-
if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; then
|
|
37
|
-
sudo certbot certonly --standalone -d $api_gateway_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --pre-hook="sudo systemctl stop nginx" --post-hook="sudo systemctl start nginx" --deploy-hook "aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/"
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
# register SSL renewal cron
|
|
41
|
-
certbot_cron_command="/usr/bin/certbot renew --pre-hook=\"sudo systemctl stop nginx\" --deploy-hook \"aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
42
|
-
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
43
|
-
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
44
|
-
|
|
45
46
|
# configure supervisor
|
|
46
47
|
sudo sed -i "s|files = .*|files = /etc/supervisor/conf.d/*.conf ${service_dir}/supervisor/conf.d/*.conf|" /etc/supervisor/supervisord.conf
|
|
47
48
|
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
# install certbot
|
|
3
|
+
sudo snap refresh core
|
|
4
|
+
sudo apt remove certbot
|
|
5
|
+
sudo snap install --classic certbot
|
|
6
|
+
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
7
|
+
|
|
8
|
+
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
9
|
+
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
|
|
10
|
+
sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
|
|
11
|
+
|
|
12
|
+
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
13
|
+
if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
|
|
14
|
+
sudo certbot certonly --standalone -d $portal_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/"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# register SSL renewal cron
|
|
18
|
+
certbot_cron_command="/usr/bin/certbot renew --pre-hook=\"sudo systemctl stop nginx\" --post-hook=\"sudo systemctl start nginx\" --deploy-hook \"aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
19
|
+
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
20
|
+
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
21
|
+
|
|
1
22
|
# install nginx
|
|
2
23
|
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -yq
|
|
3
24
|
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
|
|
@@ -30,25 +51,5 @@ cd $service_dir
|
|
|
30
51
|
sudo npm i
|
|
31
52
|
sudo NODE_OPTIONS="--max-old-space-size=2048 NUXT_TELEMETRY_DISABLED=1" npm run generate
|
|
32
53
|
|
|
33
|
-
# install certbot
|
|
34
|
-
sudo snap refresh core
|
|
35
|
-
sudo apt remove certbot
|
|
36
|
-
sudo snap install --classic certbot
|
|
37
|
-
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
|
38
|
-
|
|
39
|
-
# sync SSL certificates from S3 bucket to local (if they exist)
|
|
40
|
-
aws s3 cp s3://$public_bucket_name/ssl/ /etc/letsencrypt/live --recursive
|
|
41
|
-
sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
|
|
42
|
-
|
|
43
|
-
# obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
|
|
44
|
-
if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
|
|
45
|
-
sudo certbot certonly --standalone -d $portal_domain_name --agree-tos --non-interactive -m mistabiggx@gmail.com --no-eff-email --quiet --pre-hook="sudo systemctl stop nginx" --deploy-hook "aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/"
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
# register SSL renewal cron
|
|
49
|
-
certbot_cron_command="/usr/bin/certbot renew --pre-hook=\"sudo systemctl stop nginx\" --post-hook=\"sudo systemctl start nginx\" --deploy-hook \"aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/\" >> $logs_dir/{{serviceName}}-ssl-renewal.log"
|
|
50
|
-
certbot_cron_job="0 0,12 * * * $certbot_cron_command"
|
|
51
|
-
( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
|
|
52
|
-
|
|
53
54
|
# start nginx server
|
|
54
55
|
sudo systemctl restart nginx
|