@glicogh/healthcare-cdk 0.1.64 → 0.1.65

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.
@@ -22,18 +22,6 @@ echo "conf-dir=/etc/dnsmasq.d/,*.conf" | sudo tee -a /etc/dnsmasq.conf
22
22
  echo "conf-dir=$service_dir/dnsmasq/conf.d/,*.conf" | sudo tee -a /etc/dnsmasq.conf
23
23
  echo "port=5353" | sudo tee -a /etc/dnsmasq.conf
24
24
 
25
- # configure supervisor
26
- sudo sed -i "s|files = .*|files = /etc/supervisor/conf.d/*.conf ${service_dir}/supervisor/conf.d/*.conf|" /etc/supervisor/supervisord.conf
27
-
28
- # start supervisor
29
- sudo systemctl restart supervisor
30
-
31
- # start dnsmasq
32
- sudo systemctl restart dnsmasq
33
-
34
- # start nginx server
35
- sudo systemctl restart nginx
36
-
37
25
  # install certbot
38
26
  sudo snap refresh core
39
27
  sudo apt remove certbot
@@ -50,6 +38,18 @@ if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; th
50
38
  fi
51
39
 
52
40
  # register SSL renewal cron
53
- 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"
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"
54
42
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
55
43
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
44
+
45
+ # configure supervisor
46
+ sudo sed -i "s|files = .*|files = /etc/supervisor/conf.d/*.conf ${service_dir}/supervisor/conf.d/*.conf|" /etc/supervisor/supervisord.conf
47
+
48
+ # start supervisor
49
+ sudo systemctl restart supervisor
50
+
51
+ # start dnsmasq
52
+ sudo systemctl restart dnsmasq
53
+
54
+ # start nginx server
55
+ sudo systemctl restart nginx
@@ -30,9 +30,6 @@ cd $service_dir
30
30
  sudo npm i
31
31
  sudo NODE_OPTIONS="--max-old-space-size=2048 NUXT_TELEMETRY_DISABLED=1" npm run generate
32
32
 
33
- # start nginx server
34
- sudo systemctl restart nginx
35
-
36
33
  # install certbot
37
34
  sudo snap refresh core
38
35
  sudo apt remove certbot
@@ -45,10 +42,13 @@ sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
45
42
 
46
43
  # obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
47
44
  if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
48
- 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" --post-hook="sudo systemctl start nginx" --deploy-hook "aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/"
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/"
49
46
  fi
50
47
 
51
48
  # register SSL renewal cron
52
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"
53
50
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
54
51
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
52
+
53
+ # start nginx server
54
+ sudo systemctl restart nginx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glicogh/healthcare-cdk",
3
- "version": "0.1.64",
3
+ "version": "0.1.65",
4
4
  "description": "CDK automations",
5
5
  "bin": {
6
6
  "cdk": "bin/cdk.js"
@@ -22,18 +22,6 @@ echo "conf-dir=/etc/dnsmasq.d/,*.conf" | sudo tee -a /etc/dnsmasq.conf
22
22
  echo "conf-dir=$service_dir/dnsmasq/conf.d/,*.conf" | sudo tee -a /etc/dnsmasq.conf
23
23
  echo "port=5353" | sudo tee -a /etc/dnsmasq.conf
24
24
 
25
- # configure supervisor
26
- sudo sed -i "s|files = .*|files = /etc/supervisor/conf.d/*.conf ${service_dir}/supervisor/conf.d/*.conf|" /etc/supervisor/supervisord.conf
27
-
28
- # start supervisor
29
- sudo systemctl restart supervisor
30
-
31
- # start dnsmasq
32
- sudo systemctl restart dnsmasq
33
-
34
- # start nginx server
35
- sudo systemctl restart nginx
36
-
37
25
  # install certbot
38
26
  sudo snap refresh core
39
27
  sudo apt remove certbot
@@ -50,6 +38,18 @@ if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; th
50
38
  fi
51
39
 
52
40
  # register SSL renewal cron
53
- 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"
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"
54
42
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
55
43
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
44
+
45
+ # configure supervisor
46
+ sudo sed -i "s|files = .*|files = /etc/supervisor/conf.d/*.conf ${service_dir}/supervisor/conf.d/*.conf|" /etc/supervisor/supervisord.conf
47
+
48
+ # start supervisor
49
+ sudo systemctl restart supervisor
50
+
51
+ # start dnsmasq
52
+ sudo systemctl restart dnsmasq
53
+
54
+ # start nginx server
55
+ sudo systemctl restart nginx
@@ -30,9 +30,6 @@ cd $service_dir
30
30
  sudo npm i
31
31
  sudo NODE_OPTIONS="--max-old-space-size=2048 NUXT_TELEMETRY_DISABLED=1" npm run generate
32
32
 
33
- # start nginx server
34
- sudo systemctl restart nginx
35
-
36
33
  # install certbot
37
34
  sudo snap refresh core
38
35
  sudo apt remove certbot
@@ -45,10 +42,13 @@ sudo chown -R ubuntu:ubuntu /etc/letsencrypt/live
45
42
 
46
43
  # obtain SSL certificate (if it doesn't exist) and sync to S3 bucket
47
44
  if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
48
- 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" --post-hook="sudo systemctl start nginx" --deploy-hook "aws s3 sync /etc/letsencrypt/live s3://$public_bucket_name/ssl/"
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/"
49
46
  fi
50
47
 
51
48
  # register SSL renewal cron
52
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"
53
50
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
54
51
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
52
+
53
+ # start nginx server
54
+ sudo systemctl restart nginx