{"id":299976,"date":"2020-03-11T15:00:36","date_gmt":"2020-03-11T15:00:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299976"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-03-11T15:00:36","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299976","title":{"rendered":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u043c\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0432 Heroku"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/491870\/\">\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u0448\u0435 <code>Java<\/code> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043e \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 &quot;Heroku&quot;, \u0438 \u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a HTTP \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 <code>\u043e\u0431\u043b\u0430\u043a\u0435<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/code>.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<ul>\n<li><em>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <code>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 <code>\u043e\u0431\u043b\u0430\u043a\u0435<\/code>.<\/em><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e <code>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0444\u0430\u0439\u043b\u0430\u0445 \u2014 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u043a\u043b\u044e\u0447\u0435\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <code>.p12<\/code> \u0438\u043b\u0438 <code>jks<\/code> \u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 <code>\u043e\u0431\u043b\u0430\u043a\u0435<\/code>:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p>\u0414\u0430\u0436\u0435 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u043e\u043b\u0435\u043c <code>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438<\/code> \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/p>\n<p>  <\/li>\n<li>\n<p>\u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432 Docker \u0438 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043b\u0438\u0446\u0430\u043c<\/p>\n<p>  <\/li>\n<li>\n<p><em>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043d\u0430 <code>Java<\/code>!<\/em><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u043e\u0440\u0438\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u041e\u0444\u0438\u0446\u0435\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 (\u043e.\u0431.) \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 <code>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447<\/code> \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 <code>Base64<\/code><\/li>\n<li>\u041e.\u0431. \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u0432 <code>\u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u0430<\/code> (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 Heroku Dashboard)<\/li>\n<li>\u041e.\u0431. \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 <code>Base64<\/code> \u0432 <code>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/code><\/li>\n<li>\u041a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u044d\u0442\u0430 \u0436\u0435 <code>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/code> \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u0439\u043b<\/li>\n<li>\u041f\u0443\u0442\u044c \u043a \u044d\u0442\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/li>\n<\/ol>\n<p>  <\/p>\n<ul>\n<li><em>\u0422\u0435\u043f\u0435\u0440\u044c, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0443\u0433 \u043b\u0438\u0446, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f \u043a <code>\u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u0430<\/code>, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a <code>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443<\/code>.<\/em><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u042f\u0437\u044b\u043a: <code>Java<\/code><\/li>\n<li>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430: <code>Heroku<\/code><\/li>\n<li>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0431\u043e\u0440\u043a\u0438: <code>Gradle<\/code><\/li>\n<li>\u0424\u043e\u0440\u043c\u0430\u0442 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043a\u043b\u044e\u0447\u0435\u0439: <code>PKCS12<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"eksport-fayla-p12\">\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0444\u0430\u0439\u043b\u0430 .p12<\/h2>\n<p>  <\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432 \u0412\u0430\u0448\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.igorkromin.net\/index.php\/2017\/04\/26\/base64-encode-or-decode-on-the-command-line-without-installing-extra-tools-on-linux-windows-or-macos\/\" rel=\"nofollow\"><code>\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0444\u0430\u0439\u043b\u0430 \u0432 Base64<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (Windows, Linux)<\/a><\/p>\n<p>  <\/li>\n<li>\n<p><em>\u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0439\u0442\u0435 \u0432\u0430\u0448\u0438 <code>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438<\/code> \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u043e\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/em><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"import-v-heroku\">\u0418\u043c\u043f\u043e\u0440\u0442 \u0432 Heroku<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 <code>Heroku<\/code><\/li>\n<li>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0441\u0435\u043a\u0446\u0438\u044e <code>Settings<\/code> \u0412\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 &quot;Reveal the config vars&quot;<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<br \/> \n<ul>\n<li><code>keyStoreFileName<\/code> \u2014 \u043b\u044e\u0431\u043e\u0435 \u043d\u0435\u0437\u0430\u043d\u044f\u0442\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 &quot;private_key.p12&quot;<\/li>\n<li><code>keyStoreBase64<\/code> \u2014 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u044e\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>Base64<\/code>, \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435 &quot;\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0444\u0430\u0439\u043b\u0430 .p12&quot;<\/li>\n<li><code>keyStorePassword<\/code> \u2014 \u043f\u0430\u0440\u043e\u043b\u044c, \u0440\u0430\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0441 \u0444\u0430\u0439\u043b\u043e\u043c .p12<\/li>\n<li><code>keyStoreType<\/code> \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>pkcs12<\/code><\/li>\n<li><code>trustStoreType<\/code> \u2014 <code>jks<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"zapis-fayla-p12-ispolzuya-gradle\">\u0417\u0430\u043f\u0438\u0441\u044c \u0444\u0430\u0439\u043b\u0430 .p12 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Gradle<\/h2>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u0438\u0436\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0432 \u0412\u0430\u0448 \u0444\u0430\u0439\u043b <code>guild.gradle<\/code> \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 <code>stage<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">task initKeyStore() {     doLast {         println(&quot;Creating keystore file from environment variables.&quot;)         String keyStoreFileName = System.getenv(&quot;keyStoreFileName&quot;)         if (keyStoreFileName != null) {             String keyStoreBase64 = System.getenv(&quot;keyStoreBase64&quot;)             new File(keyStoreFileName).withOutputStream {                 it.write(Base64.decoder.decode(keyStoreBase64))             }         }     } } stage.dependsOn(initKeyStore)<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"peredacha-rekvizitov-cherez-procfile-heroku\">\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 &quot;procfile&quot; <code>Heroku<\/code><\/h2>\n<p>  <\/p>\n<p>\u0412 &quot;procfile&quot; \u0432 <code>Heroku<\/code> \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 <code>shell \u0441\u043a\u0440\u0438\u043f\u0442<\/code> \u2014 <code>runApp.sh<\/code>.<\/p>\n<p>  <\/p>\n<p>runApp.sh:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">java \\  -Dserver.port=$PORT \\ ...  -Djavax.net.ssl.keyStoreType=$keyStoreType \\  -Djavax.net.ssl.trustStoreType=$trustStoreType \\  -Djavax.net.ssl.keyStore=$keyStoreFileName \\  -Djavax.net.ssl.keyStorePassword=$keyStorePassword \\  $JAVA_OPTS \\ ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 <code>\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>git<\/code> \u0438 \u043f\u0440\u043e\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c (push) \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 (commit):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">git update-index --chmod=+x runApp.sh git commit -m '\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 runApp.sh' git push origin master<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"ogranicheniya\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <code>Heroku<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e 32 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 <code>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/code>.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u0438 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438\u0445 \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 <code>Heroku<\/code>, <code>Gradle<\/code> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0432\u0438\u0434\u0435 \u0444\u0430\u0439\u043b\u0430 <code>P12<\/code> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/code>.<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>procfile<\/code>, \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 <code>Heroku<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0412\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/li>\n<li><code>\u041f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447<\/code> \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f <code>\u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/code> \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>.p12<\/code> \u0432 <code>Java<\/code><\/li>\n<li>\u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/491870\/\"> https:\/\/habr.com\/ru\/post\/491870\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/491870\/\">\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u0448\u0435 <code>Java<\/code> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043e \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 &quot;Heroku&quot;, \u0438 \u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a HTTP \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 <code>\u043e\u0431\u043b\u0430\u043a\u0435<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/code>.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-299976","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=299976"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299976\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}