@glicogh/healthcare-cdk 0.1.73 → 0.1.74

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.
@@ -36,10 +36,13 @@ if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; th
36
36
  fi
37
37
 
38
38
  # register SSL renewal cron
39
- 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"
39
+ certbot_cron_command="/usr/bin/certbot renew >> $logs_dir/{{serviceName}}-ssl-renewal.log"
40
40
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
41
41
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
42
42
 
43
+ # stop nginx server to update configuration
44
+ sudo systemctl stop nginx
45
+
43
46
  # copy appropriate server_name.conf based on env
44
47
  cat $service_dir/nginx/microservices/server_name.{{envName}}.conf | sudo tee $service_dir/nginx/microservices/server_name.conf
45
48
 
@@ -56,4 +59,4 @@ sudo systemctl restart supervisor
56
59
  sudo systemctl restart dnsmasq
57
60
 
58
61
  # start nginx server
59
- sudo systemctl restart nginx
62
+ sudo systemctl start nginx
@@ -40,10 +40,13 @@ if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
40
40
  fi
41
41
 
42
42
  # register SSL renewal cron
43
- 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"
43
+ certbot_cron_command="/usr/bin/certbot renew >> $logs_dir/{{serviceName}}-ssl-renewal.log"
44
44
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
45
45
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
46
46
 
47
+ # stop nginx server to update configuration
48
+ sudo systemctl stop nginx
49
+
47
50
  # copy appropriate server_name.conf based on env
48
51
  cat $service_dir/.infra/nginx/portal/server_name.{{envName}}.conf | sudo tee $service_dir/.infra/nginx/portal/server_name.conf
49
52
 
@@ -55,4 +58,4 @@ sudo ln -sf $service_dir/.infra/nginx/portal /etc/nginx/portal
55
58
  sudo ln -sf $service_dir/.infra/nginx/conf.d/portal.conf /etc/nginx/conf.d/portal.conf
56
59
 
57
60
  # start nginx server
58
- sudo systemctl restart nginx
61
+ sudo systemctl start nginx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glicogh/healthcare-cdk",
3
- "version": "0.1.73",
3
+ "version": "0.1.74",
4
4
  "description": "CDK automations",
5
5
  "bin": {
6
6
  "cdk": "bin/cdk.js"
@@ -36,10 +36,13 @@ if [[ ! -f "/etc/letsencrypt/live/$api_gateway_domain_name/fullchain.pem" ]]; th
36
36
  fi
37
37
 
38
38
  # register SSL renewal cron
39
- 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"
39
+ certbot_cron_command="/usr/bin/certbot renew >> $logs_dir/{{serviceName}}-ssl-renewal.log"
40
40
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
41
41
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
42
42
 
43
+ # stop nginx server to update configuration
44
+ sudo systemctl stop nginx
45
+
43
46
  # copy appropriate server_name.conf based on env
44
47
  cat $service_dir/nginx/microservices/server_name.{{envName}}.conf | sudo tee $service_dir/nginx/microservices/server_name.conf
45
48
 
@@ -56,4 +59,4 @@ sudo systemctl restart supervisor
56
59
  sudo systemctl restart dnsmasq
57
60
 
58
61
  # start nginx server
59
- sudo systemctl restart nginx
62
+ sudo systemctl start nginx
@@ -40,10 +40,13 @@ if [[ ! -f "/etc/letsencrypt/live/$portal_domain_name/fullchain.pem" ]]; then
40
40
  fi
41
41
 
42
42
  # register SSL renewal cron
43
- 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"
43
+ certbot_cron_command="/usr/bin/certbot renew >> $logs_dir/{{serviceName}}-ssl-renewal.log"
44
44
  certbot_cron_job="0 0,12 * * * $certbot_cron_command"
45
45
  ( ( crontab -l || true ) | ( grep -v -F "$certbot_cron_command" || true ) ; echo "$certbot_cron_job" ) | crontab -
46
46
 
47
+ # stop nginx server to update configuration
48
+ sudo systemctl stop nginx
49
+
47
50
  # copy appropriate server_name.conf based on env
48
51
  cat $service_dir/.infra/nginx/portal/server_name.{{envName}}.conf | sudo tee $service_dir/.infra/nginx/portal/server_name.conf
49
52
 
@@ -55,4 +58,4 @@ sudo ln -sf $service_dir/.infra/nginx/portal /etc/nginx/portal
55
58
  sudo ln -sf $service_dir/.infra/nginx/conf.d/portal.conf /etc/nginx/conf.d/portal.conf
56
59
 
57
60
  # start nginx server
58
- sudo systemctl restart nginx
61
+ sudo systemctl start nginx