{"id":409587,"date":"2024-06-29T20:53:10","date_gmt":"2024-06-29T20:53:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=409587"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=409587","title":{"rendered":"<span>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 HTTPS \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 TeamCity<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440. \u042f \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Visiology. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 <s>\u043d\u0430\u0448\u0438\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u043c<\/s>, \u043a\u0430\u043a \u043c\u044b \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 \u043d\u0430\u0448 CI\/CD \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e HTTPS.<\/p>\n<h2>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0411\u044b\u043b \u0441\u0435\u0440\u0432\u0435\u0440 TeamCity, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0431\u044b\u043b \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442 \u0432 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u043e HTTP. \u0410 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e HTTPS \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0438 <s>\u0431\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043c\u0441<\/s> \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e + \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. &#171;\u0421\u043b\u043e\u0436\u043d\u044b\u0435&#187; \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 TeamCity \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/www.jetbrains.com\/help\/teamcity\/using-https-to-access-teamcity-server.html\">\u0442\u0443\u0442<\/a>, \u0430 \u0440\u043e\u0430\u0434\u043c\u0430\u043f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u043e\u0431\u0435\u0449\u0430\u044e\u0442 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, <a href=\"https:\/\/www.jetbrains.com\/teamcity\/roadmap\/#core-ci-improvements\">\u0442\u0443\u0442<\/a>. \u0412\u0440\u0435\u043c\u0435\u043d\u0438 \u0436\u0434\u0430\u0442\u044c \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442, \u0430 \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p>\u041a\u043e\u043c\u0443 \u043b\u0435\u043d\u044c \u0432\u0441\u0451 \u0447\u0438\u0442\u0430\u0442\u044c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/AlexNik\/letsencrypt-tutorial\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>, \u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u044f \u0440\u0430\u0437\u0431\u0438\u043b \u043f\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u043c, \u0442\u0430\u043a \u0436\u0435 \u0442\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0448\u0430\u0433\u0430\u043c\u0438.<\/p>\n<h2>\u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 <s>\u043a\u043e\u0448\u043a\u0430\u0445<\/s> \u043f\u0440\u043e\u0441\u0442\u043e\u043c Python \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>main.py<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import http.server import socketserver  PORT = 8000   class SimpleHandler(http.server.SimpleHTTPRequestHandler):     def do_GET(self) -> None:         self.send_response(200, 'Simple-Server-Response')         self.send_header('Content-type', 'text\/plain')         self.end_headers()         self.wfile.write(b'Hello!\\n')   with socketserver.TCPServer((\"\", PORT), SimpleHandler) as httpd:     print(\"serving at port\", PORT)     httpd.serve_forever() <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430 8000 \u043f\u043e\u0440\u0442\u0443 \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 &#171;Hello!&#187;. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c.<\/p>\n<pre><code class=\"bash\">test@test:~\/simple-server$ curl http:\/\/127.0.0.1:8000 Hello! test@test:~\/simple-server$<\/code><\/pre>\n<p>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d98\/53f\/224\/d9853f224c73fa63450d1831d48515a9.PNG\" width=\"1280\" height=\"720\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0417\u0430\u043f\u0430\u043a\u0443\u0435\u043c \u0432 Docker<\/h2>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0437 \u043d\u0435\u0433\u043e Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 &#171;\u0437\u0430\u0441\u043e\u0440\u044f\u0442\u044c&#187; \u0445\u043e\u0441\u0442\u043e\u0432\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>Dockerfile<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">FROM python:3.9-alpine  EXPOSE 8000  COPY main.py \/main.py  ENTRYPOINT [\"python\"]  CMD [\"main.py\"]<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0443\u043f\u0435\u0440! \u0411\u0438\u043b\u0434\u0438\u043c, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c.<\/p>\n<pre><code>test@test:~\/simple-server$ docker build -t simple-server . ... Successfully built 43d18cb628fc Successfully tagged simple-server:latest  test@test:~\/simple-server$ docker run -dt --name simple-server -p 8000:8000 simple-server 7f2d3e770b3ed0f0bfabbd1849486d8c2be99c7eab05ff3c452091e9d4417aec  test@test:~\/simple-server$ curl http:\/\/127.0.0.1:8000 Hello! test@test:~\/simple-server$<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fbf\/985\/0cc\/fbf9850cc90047318652de3fe3c0e715.PNG\" width=\"1280\" height=\"720\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c &#171;\u0431\u0435\u043b\u044b\u0439&#187; \u0430\u0439\u043f\u0438\u0448\u043d\u0438\u043a \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 DNS \u0438\u043c\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438\u0437\u0432\u043d\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 TeamCity, \u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e \u0437\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u043f\u043e HTTP, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 HTTPS.<\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043e\u0442 <a href=\"https:\/\/letsencrypt.org\/\">Let\u2019s Encrypt<\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0432\u0441\u044e \u0432\u043e\u0434\u0443, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u0440\u0451\u043c \u0448\u0430\u0433\u0430\u043c:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e nginx \u0441\u0435\u0440\u0432\u0435\u0440\u0443<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, nginx, certbot (\u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430)<\/p>\n<\/li>\n<\/ol>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0432\u0437\u044f\u043b <a href=\"https:\/\/gist.github.com\/dancheskus\/8d26823d0f5633e9dde63d150afb40b2\">\u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a>, \u043d\u043e \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u0430. \u041f\u043e\u0442\u043e\u043c \u044f \u043d\u0430\u0448\u0451\u043b <a href=\"https:\/\/github.com\/wmnnd\/nginx-certbot\">&#171;\u0432\u0441\u0451 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435&#187;<\/a>, \u0442\u0430\u043c \u0432\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e.<\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u0438\u043c nginx<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 nginx.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>server_data<\/code>, \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0451 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0449\u0451 \u043f\u0430\u043f\u043a\u0443 <code>data<\/code>, \u0430 \u0432 \u043d\u0435\u0439 \u0444\u0430\u0439\u043b <code>nginx.conf<\/code><\/p>\n<details class=\"spoiler\">\n<summary>nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\">server {   resolver     127.0.0.11;   listen       80; # public server port    set $simple_server_url http:\/\/simple-server:8000;    location \/ {     proxy_pass $simple_server_url;   } }<\/code><\/pre>\n<p>127.0.0.11 &#8212; DNS \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0434\u043e\u043a\u0435\u0440 \u0441\u0435\u0442\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/p>\n<p>\u0441\u043b\u0443\u0448\u0430\u0435\u043c \u043d\u0430 80 \u043f\u043e\u0440\u0442\u0443<\/p>\n<p>\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e simple_server_url, \u0430 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u0438\u0448\u0435\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 location, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c nginx \u0432\u0441\u0435 proxy_pass \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b, \u0430 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0435\u043d\u0442\u0443 \u043d\u0435 \u0441\u0442\u0430\u0440\u0442\u0430\u043d\u0451\u0442, \u0442\u043e nginx \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f<\/p>\n<p>simple-server &#8212; \u0437\u0434\u0435\u0441\u044c DNS \u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u043d\u0430\u0448\u0438\u043c python \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 <code>server_data<\/code> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>docker-compose.yml<\/code> <\/p>\n<details class=\"spoiler\">\n<summary>docker-compose.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">version: '3.8'  services:   simple-server:     container_name: simple-server     image: simple-server     restart: unless-stopped     networks:       nginx_net:    nginx:     container_name: nginx     image: nginx:1.21.1     restart: unless-stopped     volumes:       - .\/data\/nginx.conf:\/etc\/nginx\/conf.d\/default.conf     ports:       - 80:80     networks:       nginx_net:  networks:   nginx_net:<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c  <code>docker-compose up -d<\/code> \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <code>server_data<\/code>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0443\u0436\u0435 \u043d\u0430 80 \u043f\u043e\u0440\u0442\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430 nginx.<\/p>\n<pre><code class=\"bash\">test@test:~\/server_data$ docker-compose up -d Creating nginx         ... done Creating simple-server ... done test@test:~\/server_data$ curl http:\/\/127.0.0.1 Hello! test@test:~\/server_data$<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430 nginx \u043f\u043e HTTP. \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0448\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430 HTTPS. \u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>nginx.conf<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>$server_url<\/code> &#8212; \u0432\u0435\u0440\u043d\u043e\u0435 DNS \u0438\u043c\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/593\/43f\/942\/59343f942edf45bcf433449d3750f04d.PNG\" width=\"1280\" height=\"720\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/h2>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0438\u0437 <a href=\"https:\/\/gist.github.com\/dancheskus\/8d26823d0f5633e9dde63d150afb40b2\">\u0441\u0442\u0430\u0442\u044c\u0438 <\/a>\u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438\u0437-\u0437\u0430 \u0431\u0438\u0442\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a, \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 <a href=\"https:\/\/github.com\/wmnnd\/nginx-certbot\/blob\/master\/init-letsencrypt.sh\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432\u0430\u0436\u043d\u044b \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u0437 <code>docker-compose.yml<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>init-letsencrypt.sh<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">#!\/bin\/bash  if ! [ -x \"$(command -v docker-compose)\" ]; then   echo 'Error: docker-compose is not installed.' >&amp;2   exit 1 fi  domains=(example.org www.example.org) rsa_key_size=4096 data_path=\".\/data\/certbot\" email=\"\" # Adding a valid address is strongly recommended staging=1 # Set to 1 if you're testing your setup to avoid hitting request limits  if [ -d \"$data_path\" ]; then   read -p \"Existing data found for $domains. Continue and replace existing certificate? (y\/N) \" decision   if [ \"$decision\" != \"Y\" ] &amp;&amp; [ \"$decision\" != \"y\" ]; then     exit   fi fi   if [ ! -e \"$data_path\/conf\/options-ssl-nginx.conf\" ] || [ ! -e \"$data_path\/conf\/ssl-dhparams.pem\" ]; then   echo \"### Downloading recommended TLS parameters ...\"   mkdir -p \"$data_path\/conf\"   curl -s https:\/\/raw.githubusercontent.com\/certbot\/certbot\/master\/certbot-nginx\/certbot_nginx\/_internal\/tls_configs\/options-ssl-nginx.conf > \"$data_path\/conf\/options-ssl-nginx.conf\"   curl -s https:\/\/raw.githubusercontent.com\/certbot\/certbot\/master\/certbot\/certbot\/ssl-dhparams.pem > \"$data_path\/conf\/ssl-dhparams.pem\"   echo fi  echo \"### Creating dummy certificate for $domains ...\" path=\"\/etc\/letsencrypt\/live\/$domains\" mkdir -p \"$data_path\/conf\/live\/$domains\" docker-compose run --rm --entrypoint \"\\   openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\\     -keyout '$path\/privkey.pem' \\     -out '$path\/fullchain.pem' \\     -subj '\/CN=localhost'\" certbot echo   echo \"### Starting nginx ...\" docker-compose up --force-recreate -d nginx echo  echo \"### Deleting dummy certificate for $domains ...\" docker-compose run --rm --entrypoint \"\\   rm -Rf \/etc\/letsencrypt\/live\/$domains &amp;&amp; \\   rm -Rf \/etc\/letsencrypt\/archive\/$domains &amp;&amp; \\   rm -Rf \/etc\/letsencrypt\/renewal\/$domains.conf\" certbot echo   echo \"### Requesting Let's Encrypt certificate for $domains ...\" #Join $domains to -d args domain_args=\"\" for domain in \"${domains[@]}\"; do   domain_args=\"$domain_args -d $domain\" done  # Select appropriate email arg case \"$email\" in   \"\") email_arg=\"--register-unsafely-without-email\" ;;   *) email_arg=\"--email $email\" ;; esac  # Enable staging mode if needed if [ $staging != \"0\" ]; then staging_arg=\"--staging\"; fi  docker-compose run --rm --entrypoint \"\\   certbot certonly --webroot -w \/var\/www\/certbot \\     $staging_arg \\     $email_arg \\     $domain_args \\     --rsa-key-size $rsa_key_size \\     --agree-tos \\     --force-renewal\" certbot echo  echo \"### Reloading nginx ...\" docker-compose exec nginx nginx -s reload<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 <code>init-letsencrypt.sh<\/code>\u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 8, 11 \u0438 12 \u0441\u0442\u0440\u043e\u0447\u043a\u0435. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>staging<\/code> \u043b\u0443\u0447\u0448\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c 1, \u043f\u043e\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u0430\u0448\u0435 DNS \u0438\u043c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b, \u0434\u0435\u0444\u0438\u0441 \u0438 \u0446\u0438\u0444\u0440\u044b, \u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0434\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Punycode\">Punycode<\/a>.<\/p>\n<p>\u0415\u0449\u0451 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0444\u0430\u0439\u043b\u044b <code>docker-compose.yml<\/code> \u0438 <code>nginx.conf<\/code>. \u0412 \u0444\u0430\u0439\u043b\u0435 <code>docker-compose.yml<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 <code>certbot<\/code>, \u0430 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 <code>nginx<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u0449\u0438\u0435 \u0441 <code>certbot<\/code>  <code>volumes<\/code>, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c 443 \u043f\u043e\u0440\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u043a\u0446\u0438\u044e <code>command<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 nginx \u043a\u0430\u0436\u0434\u044b\u0435 6 \u0447\u0430\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c.  \u0421\u0435\u0440\u0432\u0438\u0441  <code>certbot<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Let&#8217;s Encrypt \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>docker-compose.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">version: '3.8'  services:   simple-server:     container_name: simple-server     image: simple-server     restart: unless-stopped     networks:       nginx_net:    nginx:     container_name: nginx     image: nginx:1.21.1     restart: unless-stopped     volumes:       - .\/data\/nginx.conf:\/etc\/nginx\/conf.d\/default.conf       - .\/data\/certbot\/conf:\/etc\/letsencrypt       - .\/data\/certbot\/www:\/var\/www\/certbot     ports:       - 80:80       - 443:443     command: \"\/bin\/sh -c 'while :; do sleep 6h &amp; wait $${!}; nginx -s reload; done &amp; nginx -g \\\"daemon off;\\\"'\"     networks:       nginx_net:    certbot:     container_name: certbot     image: certbot\/certbot:v1.17.0     restart: unless-stopped     entrypoint:  \"\/bin\/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h &amp; wait $${!}; done;'\"     networks:       nginx_net:     volumes:       - .\/data\/certbot\/conf:\/etc\/letsencrypt       - .\/data\/certbot\/www:\/var\/www\/certbot  networks:   nginx_net: <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041d\u043e \u0435\u0449\u0451 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b <code>nginx.conf<\/code>, \u0432 \u043d\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f <code>location<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a <code>certbot<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\">server {   resolver     127.0.0.11;   listen       80; # public server port      location \/.well-known\/acme-challenge\/ { root \/var\/www\/certbot; }    set $simple_server_url http:\/\/simple-server:8000;    location \/ {     proxy_pass $simple_server_url;   } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 <code>init-letsencrypt.sh<\/code> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>staging=1<\/code>. \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ec\/e41\/a46\/8ece41a463bc984ca2a8ef2bfa546c66.png\" width=\"618\" height=\"138\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ec\/e41\/a46\/8ece41a463bc984ca2a8ef2bfa546c66.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>staging=0<\/code>. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a, \u0430 \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u0431\u044b\u043b\u043e \u043f\u0430\u0440\u0443 \u0440\u0430\u0437, \u0442\u043e \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0430 nginx.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c <code>docker-compose.yml<\/code> \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0431\u0449\u0438\u0445 <code>volume<\/code> \u0443 <code>nginx<\/code> \u0438 <code>certbot<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c <code>set -x<\/code> \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430 (\u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b).<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 <code>init-letsencrypt.sh<\/code> \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>--rm<\/code> \u0432 69 \u0441\u0442\u0440\u043e\u0447\u043a\u0435, \u0442\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u0441\u044f \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u043b\u043e\u0433. \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>-v<\/code> \u043f\u0435\u0440\u0435\u0434 <code>\\<\/code> \u0432 73 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0435\u0434\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c <code>debug<\/code> \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 <code>nginx<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>staging=0<\/code>, \u0438\u043d\u0430\u0447\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0438 HTTPS \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<h2>\u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c. \u041d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c nginx \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e HTTPS \u0438 \u0432\u0441\u0451. \u041e\u0442\u043a\u0440\u043e\u0435\u043c 443 \u043f\u043e\u0440\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0443\u0442\u044c \u043a SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c, \u043f\u0443\u0442\u0438 \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c letsencrypt \u0438 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u0441 HTTP \u043d\u0430 HTTPS. \u0412\u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043d\u0438\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c &lt;URL>, \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 \u0432\u0430\u0448, \u0432 \u0444\u0430\u0439\u043b\u0435 \u043d\u0438\u0436\u0435 \u044d\u0442\u043e 2, 10 \u0438 11 \u0441\u0442\u0440\u043e\u0447\u043a\u0430. \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Punycode\">Punycode<\/a>, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u041f\u0430\u0440\u0443 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0435 <code>certbot<\/code> \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u043f\u0430\u043f\u043a\u0438 \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c <code>www.<\/code>, \u044d\u0442\u043e \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\">server {   resolver     127.0.0.11;   listen       80; # public server port   listen       443 ssl;    ssl_certificate \/etc\/letsencrypt\/live\/&lt;URL>\/fullchain.pem;   ssl_certificate_key \/etc\/letsencrypt\/live\/&lt;URL>\/privkey.pem;      include \/etc\/letsencrypt\/options-ssl-nginx.conf;   ssl_dhparam \/etc\/letsencrypt\/ssl-dhparams.pem;    location \/.well-known\/acme-challenge\/ { root \/var\/www\/certbot; }    if ($server_port = 80) { set $https_redirect 1; }   if ($host ~ '^www\\.') { set $https_redirect 1; }   if ($https_redirect = 1) { return 301 https:\/\/$server_url$request_uri; }    set $simple_server_url http:\/\/simple-server:8000;    location \/ {     proxy_pass $simple_server_url;   } }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b<\/p>\n<pre><code class=\"bash\">docker-compose up --force-recreate -d<\/code><\/pre>\n<p>\u0418 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0430 &lt;URL> \u043f\u043e HTTP, \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 HTTPS.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d24\/618\/3a6\/d246183a64a2282f1e30210e46a16bf8.png\" width=\"761\" height=\"281\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d24\/618\/3a6\/d246183a64a2282f1e30210e46a16bf8.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e! \u0422\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043b\u044e\u0431\u043e\u0435 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e HTTPS, \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 HTTPS \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e26\/987\/315\/e26987315bb15a867f8a9c954191225b.PNG\" width=\"1280\" height=\"720\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a TeamCity<\/h2>\n<p>TeamCity \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043b\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0432\u043e\u0437\u044c\u043c\u0443 &#171;\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e&#187; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b &#171;\u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u043e\u0441\u044c&#187;. \u0414\u043b\u044f TeamCity \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 &#8212; \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 <code>nginx.conf<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u0411\u0435\u0440\u0451\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 <a href=\"https:\/\/www.jetbrains.com\/help\/teamcity\/how-to.html#NGINX\">\u043e\u0442\u0441\u044e\u0434\u0430 <\/a>\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0441 \u043d\u0430\u0448\u0438\u043c <strong>\u0411\u0415\u0417<\/strong> \u0441\u0442\u0440\u043e\u0447\u043a\u0438\u0438 <code>http<\/code>. \u0415\u0449\u0451 \u0432\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b TeamCity \u043d\u0443\u0436\u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f <code>server_name<\/code>, \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 Python \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439:<\/p>\n<details class=\"spoiler\">\n<summary>nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\"># ... default settings here proxy_read_timeout     1200; proxy_connect_timeout  240; client_max_body_size   0;    # maximum size of an HTTP request. 0 allows uploading large artifacts to TeamCity  map $http_upgrade $connection_upgrade { # WebSocket support     default upgrade;     '' ''; }  server {   server_name &lt;URL> www.&lt;URL>; # public server host name    resolver 127.0.0.11;   listen       80; # public server port   listen       443 ssl; # public server port    ssl_certificate \/etc\/letsencrypt\/live\/&lt;URL>\/fullchain.pem;   ssl_certificate_key \/etc\/letsencrypt\/live\/&lt;URL>\/privkey.pem;    include \/etc\/letsencrypt\/options-ssl-nginx.conf;   ssl_dhparam \/etc\/letsencrypt\/ssl-dhparams.pem;    location \/.well-known\/acme-challenge\/ { root \/var\/www\/certbot; }    if ($server_port = 80) { set $https_redirect 1; }   if ($host ~ '^www\\.') { set $https_redirect 1; }   if ($https_redirect = 1) { return 301 https:\/\/$server_url$request_uri; }    set $teamcity_server_url http:\/\/teamcity-server-instance:8111;    location \/ { # public context (should be the same as internal context)     proxy_pass $teamcity_server_url; # full internal address     proxy_http_version  1.1;     proxy_set_header    Host $server_name:$server_port;     proxy_set_header    X-Forwarded-Host $http_host;    # necessary for proper absolute redirects and TeamCity CSRF check     proxy_set_header    X-Forwarded-Proto $scheme;     proxy_set_header    X-Forwarded-For $remote_addr;     proxy_set_header    Upgrade $http_upgrade; # WebSocket support     proxy_set_header    Connection $connection_upgrade; # WebSocket support   } }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418 \u0444\u0430\u0439\u043b <code>docker-compose.yml<\/code><\/p>\n<details class=\"spoiler\">\n<summary>docker-compose.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">version: '3.8'  services:   teamcity_server:     container_name: teamcity-server-instance     image: jetbrains\/teamcity-server:2021.1     restart: unless-stopped     tty: true     networks:       nginx_net:    nginx:     container_name: nginx     image: nginx:1.21.1     restart: unless-stopped     volumes:       - .\/data\/nginx.conf:\/etc\/nginx\/conf.d\/default.conf       - .\/data\/certbot\/conf:\/etc\/letsencrypt       - .\/data\/certbot\/www:\/var\/www\/certbot     ports:       - 80:80       - 443:443     command: \"\/bin\/sh -c 'while :; do sleep 6h &amp; wait $${!}; nginx -s reload; done &amp; nginx -g \\\"daemon off;\\\"'\"     networks:       nginx_net:    certbot:     container_name: certbot     image: certbot\/certbot:v1.17.0     restart: unless-stopped     entrypoint:  \"\/bin\/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h &amp; wait $${!}; done;'\"     networks:       nginx_net:     volumes:       - .\/data\/certbot\/conf:\/etc\/letsencrypt       - .\/data\/certbot\/www:\/var\/www\/certbot    networks:   nginx_net: <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>docker-compose up -d<\/code>, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e URL \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c TeamCity.<\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u0430<\/h2>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u0438\u043b\u0434 \u0430\u0433\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043c\u0438\u0440\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0441 \u0434\u043e\u043a\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <\/p>\n<pre><code class=\"bash\">docker run -dt -e SERVER_URL=\"https:\/\/&lt;URL>\" \\   --name teamcity-agent-instance jetbrains\/teamcity-agent:2021.1<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/493\/a1c\/888\/493a1c8883a2066b71801229126c6231.PNG\" width=\"1280\" height=\"720\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0410\u0433\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 TeamCity \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0441 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<h2>\u0410\u0433\u0435\u043d\u0442 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/h2>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c 2 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 TeamCity, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0431\u0438\u043b\u0434 \u0430\u0433\u0435\u043d\u0442\u043e\u043c, \u043d\u043e \u0443 \u043d\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u0411\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0435\u0442\u044c \u0437\u0430\u0449\u0451\u043d\u043d\u0430\u044f \u0438 \u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u043e HTTP. \u0422\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0430\u0433\u0435\u043d\u0442\u0430 \u0441 \u0442\u0430\u043a\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>SERVER_URL=\"https:\/\/&lt;URL>\"<\/code> \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442, \u0430 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 <code>SERVER_URL=\"http:\/\/&lt;SERVER_LOCAL_IP>\"<\/code>. \u041f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0435\u0449\u0451 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 nginx &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u0435\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/p>\n<details class=\"spoiler\">\n<summary>nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\"># ... default settings here proxy_read_timeout     1200; proxy_connect_timeout  240; client_max_body_size   0;    # maximum size of an HTTP request. 0 allows uploading large artifacts to TeamCity  map $http_upgrade $connection_upgrade { # WebSocket support     default upgrade;     '' ''; }  server {   resolver      127.0.0.11;   listen        80; #  server port   server_name   &lt;SERVER_LOCAL_IP>; # private server host name    set $teamcity_url http:\/\/teamcity-server-instance:8111;    location \/ { # public context (should be the same as internal context)     proxy_pass $teamcity_url; # full internal address     proxy_http_version  1.1;     proxy_set_header    Host $server_name:$server_port;     proxy_set_header    X-Forwarded-Host $http_host;    # necessary for proper absolute redirects and TeamCity CSRF check     proxy_set_header    X-Forwarded-Proto $scheme;     proxy_set_header    X-Forwarded-For $remote_addr;     proxy_set_header    Upgrade $http_upgrade; # WebSocket support     proxy_set_header    Connection $connection_upgrade; # WebSocket support   } }  server {   resolver      127.0.0.11;   listen        80; # public server port   listen        443 ssl;   server_name   &lt;URL>; # public server host name    ssl_certificate \/etc\/letsencrypt\/live\/&lt;URL>\/fullchain.pem;   ssl_certificate_key \/etc\/letsencrypt\/live\/&lt;URL>\/privkey.pem;    include \/etc\/letsencrypt\/options-ssl-nginx.conf;   ssl_dhparam \/etc\/letsencrypt\/ssl-dhparams.pem;    location \/.well-known\/acme-challenge\/ { root \/var\/www\/certbot; }    if ($server_port = 80) { set $https_redirect 1; }   if ($host ~ '^www\\.') { set $https_redirect 1; }   if ($https_redirect = 1) { return 301 https:\/\/&lt;URL>$request_uri; }    set $teamcity_server_url http:\/\/teamcity-server-instance:8111;    location \/ {     proxy_pass $teamcity_server_url;     proxy_http_version  1.1;     proxy_set_header    Host $server_name:$server_port;     proxy_set_header    X-Forwarded-Host $http_host;    # necessary for proper absolute redirects and TeamCity CSRF check     proxy_set_header    X-Forwarded-Proto $scheme;     proxy_set_header    X-Forwarded-For $remote_addr;     proxy_set_header    Upgrade $http_upgrade; # WebSocket support     proxy_set_header    Connection $connection_upgrade; # WebSocket support   } }<\/code><\/pre>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/872\/340\/09c\/87234009c3e9f8a0dea93c4983e85e81.PNG\" width=\"1280\" height=\"720\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0432 \u0441 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<h2>\u0415\u0449\u0451 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439?<\/h2>\n<p>\u0410 \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0431\u0438\u043b\u0434 \u0430\u0433\u0435\u043d\u0442 \u0432 Docker Swarm \u0438\u043b\u0438 Kubernetes, \u043d\u043e <s>\u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f<\/s> &#171;\u043b\u0443\u0447\u0448\u0435\u0435 &#8212;  \u0432\u0440\u0430\u0433 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e&#187;, \u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043e\u0431\u044a\u0451\u043c\u0435 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>\u0415\u0449\u0451 \u0440\u0430\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/github.com\/AlexNik\/letsencrypt-tutorial\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> \u0441 \u0448\u0430\u0433\u0430\u043c\u0438. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<h2>UPD<\/h2>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043b \u0441\u0442\u0430\u0442\u044c\u044e \u043e <a href=\"https:\/\/habr.com\/ru\/company\/visiology\/blog\/594515\/\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 Docker \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043d\u0430 TeamCity<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/companies\/visiology\/articles\/571324\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u041f\u0440\u043e \u0447\u0442\u043e \u0435\u0449\u0451 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">41.67% <\/span><span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 TeamCity \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043e\u043a Docker \u043e\u0431\u0440\u0430\u0437\u043e\u0432<\/span><span class=\"tm-article-poll__answer-votes\">5<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 41.67%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f TeamCity \u0441 Yandex Container Registry<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">25% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Build chain \u0432 TeamCity \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043e\u043a \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 VCS<\/span><span class=\"tm-article-poll__answer-votes\">3<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 25%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">33.33% <\/span><span class=\"tm-article-poll__answer-label\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 Docker \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/span><span class=\"tm-article-poll__answer-votes\">4<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 33.33%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 12 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 7 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/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\/articles\/571324\/\"> https:\/\/habr.com\/ru\/articles\/571324\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440. \u042f \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Visiology. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 <s>\u043d\u0430\u0448\u0438\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u043c<\/s>, \u043a\u0430\u043a \u043c\u044b \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 \u043d\u0430\u0448 CI\/CD \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e HTTPS.<\/p>\n<h2>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0411\u044b\u043b \u0441\u0435\u0440\u0432\u0435\u0440 TeamCity, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0431\u044b\u043b \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442 \u0432 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u043e HTTP. \u0410 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e HTTPS \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0438 <s>\u0431\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043c\u0441<\/s> \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e + \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. &#171;\u0421\u043b\u043e\u0436\u043d\u044b\u0435&#187; \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 TeamCity \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/www.jetbrains.com\/help\/teamcity\/using-https-to-access-teamcity-server.html\">\u0442\u0443\u0442<\/a>, \u0430 \u0440\u043e\u0430\u0434\u043c\u0430\u043f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u043e\u0431\u0435\u0449\u0430\u044e\u0442 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, <a href=\"https:\/\/www.jetbrains.com\/teamcity\/roadmap\/#core-ci-improvements\">\u0442\u0443\u0442<\/a>. \u0412\u0440\u0435\u043c\u0435\u043d\u0438 \u0436\u0434\u0430\u0442\u044c \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442, \u0430 \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p>\u041a\u043e\u043c\u0443 \u043b\u0435\u043d\u044c \u0432\u0441\u0451 \u0447\u0438\u0442\u0430\u0442\u044c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/AlexNik\/letsencrypt-tutorial\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>, \u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u044f \u0440\u0430\u0437\u0431\u0438\u043b \u043f\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u043c, \u0442\u0430\u043a \u0436\u0435 \u0442\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0448\u0430\u0433\u0430\u043c\u0438.<\/p>\n<h2>\u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 <s>\u043a\u043e\u0448\u043a\u0430\u0445<\/s> \u043f\u0440\u043e\u0441\u0442\u043e\u043c Python \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>main.py<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import http.server import socketserver  PORT = 8000   class SimpleHandler(http.server.SimpleHTTPRequestHandler):     def do_GET(self) -> None:         self.send_response(200, 'Simple-Server-Response')         self.send_header('Content-type', 'text\/plain')         self.end_headers()         self.wfile.write(b'Hello!\\n')   with socketserver.TCPServer((\"\", PORT), SimpleHandler) as httpd:     print(\"serving at port\", PORT)     httpd.serve_forever() <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430 8000 \u043f\u043e\u0440\u0442\u0443 \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 &#171;Hello!&#187;. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c.<\/p>\n<pre><code class=\"bash\">test@test:~\/simple-server$ curl http:\/\/127.0.0.1:8000 Hello! test@test:~\/simple-server$<\/code><\/pre>\n<p>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a<\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0417\u0430\u043f\u0430\u043a\u0443\u0435\u043c \u0432 Docker<\/h2>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0437 \u043d\u0435\u0433\u043e Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 &#171;\u0437\u0430\u0441\u043e\u0440\u044f\u0442\u044c&#187; \u0445\u043e\u0441\u0442\u043e\u0432\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>Dockerfile<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">FROM python:3.9-alpine  EXPOSE 8000  COPY main.py \/main.py  ENTRYPOINT [\"python\"]  CMD [\"main.py\"]<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0443\u043f\u0435\u0440! \u0411\u0438\u043b\u0434\u0438\u043c, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c.<\/p>\n<pre><code>test@test:~\/simple-server$ docker build -t simple-server . ... Successfully built 43d18cb628fc Successfully tagged simple-server:latest  test@test:~\/simple-server$ docker run -dt --name simple-server -p 8000:8000 simple-server 7f2d3e770b3ed0f0bfabbd1849486d8c2be99c7eab05ff3c452091e9d4417aec  test@test:~\/simple-server$ curl http:\/\/127.0.0.1:8000 Hello! test@test:~\/simple-server$<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c &#171;\u0431\u0435\u043b\u044b\u0439&#187; \u0430\u0439\u043f\u0438\u0448\u043d\u0438\u043a \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 DNS \u0438\u043c\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438\u0437\u0432\u043d\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 TeamCity, \u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e \u0437\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u043f\u043e HTTP, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 HTTPS.<\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043e\u0442 <a href=\"https:\/\/letsencrypt.org\/\">Let\u2019s Encrypt<\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0432\u0441\u044e \u0432\u043e\u0434\u0443, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u0440\u0451\u043c \u0448\u0430\u0433\u0430\u043c:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e nginx \u0441\u0435\u0440\u0432\u0435\u0440\u0443<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, nginx, certbot (\u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430)<\/p>\n<\/li>\n<\/ol>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0432\u0437\u044f\u043b <a href=\"https:\/\/gist.github.com\/dancheskus\/8d26823d0f5633e9dde63d150afb40b2\">\u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a>, \u043d\u043e \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u0430. \u041f\u043e\u0442\u043e\u043c \u044f \u043d\u0430\u0448\u0451\u043b <a href=\"https:\/\/github.com\/wmnnd\/nginx-certbot\">&#171;\u0432\u0441\u0451 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435&#187;<\/a>, \u0442\u0430\u043c \u0432\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e.<\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u0438\u043c nginx<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 nginx.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>server_data<\/code>, \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0451 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0449\u0451 \u043f\u0430\u043f\u043a\u0443 <code>data<\/code>, \u0430 \u0432 \u043d\u0435\u0439 \u0444\u0430\u0439\u043b <code>nginx.conf<\/code><\/p>\n<details class=\"spoiler\">\n<summary>nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\">server {   resolver     127.0.0.11;   listen       80; # public server port    set $simple_server_url http:\/\/simple-server:8000;    location \/ {     proxy_pass $simple_server_url;   } }<\/code><\/pre>\n<p>127.0.0.11 &#8212; DNS \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0434\u043e\u043a\u0435\u0440 \u0441\u0435\u0442\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/p>\n<p>\u0441\u043b\u0443\u0448\u0430\u0435\u043c \u043d\u0430 80 \u043f\u043e\u0440\u0442\u0443<\/p>\n<p>\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e simple_server_url, \u0430 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u0438\u0448\u0435\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 location, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0430\u0440\u0442\u043e\u043c nginx \u0432\u0441\u0435 proxy_pass \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b, \u0430 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0435\u043d\u0442\u0443 \u043d\u0435 \u0441\u0442\u0430\u0440\u0442\u0430\u043d\u0451\u0442, \u0442\u043e nginx \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f<\/p>\n<p>simple-server &#8212; \u0437\u0434\u0435\u0441\u044c DNS \u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u043d\u0430\u0448\u0438\u043c python \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 <code>server_data<\/code> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>docker-compose.yml<\/code> <\/p>\n<details class=\"spoiler\">\n<summary>docker-compose.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">version: '3.8'  services:   simple-server:     container_name: simple-server     image: simple-server     restart: unless-stopped     networks:       nginx_net:    nginx:     container_name: nginx     image: nginx:1.21.1     restart: unless-stopped     volumes:       - .\/data\/nginx.conf:\/etc\/nginx\/conf.d\/default.conf     ports:       - 80:80     networks:       nginx_net:  networks:   nginx_net:<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c  <code>docker-compose up -d<\/code> \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <code>server_data<\/code>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0443\u0436\u0435 \u043d\u0430 80 \u043f\u043e\u0440\u0442\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430 nginx.<\/p>\n<pre><code class=\"bash\">test@test:~\/server_data$ docker-compose up -d Creating nginx         ... done Creating simple-server ... done test@test:~\/server_data$ curl http:\/\/127.0.0.1 Hello! test@test:~\/server_data$<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430 nginx \u043f\u043e HTTP. \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0448\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430 HTTPS. \u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>nginx.conf<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>$server_url<\/code> &#8212; \u0432\u0435\u0440\u043d\u043e\u0435 DNS \u0438\u043c\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/h2>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0438\u0437 <a href=\"https:\/\/gist.github.com\/dancheskus\/8d26823d0f5633e9dde63d150afb40b2\">\u0441\u0442\u0430\u0442\u044c\u0438 <\/a>\u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438\u0437-\u0437\u0430 \u0431\u0438\u0442\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a, \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 <a href=\"https:\/\/github.com\/wmnnd\/nginx-certbot\/blob\/master\/init-letsencrypt.sh\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432\u0430\u0436\u043d\u044b \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u0437 <code>docker-compose.yml<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>init-letsencrypt.sh<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">#!\/bin\/bash  if ! [ -x \"$(command -v docker-compose)\" ]; then   echo 'Error: docker-compose is not installed.' >&amp;2   exit 1 fi  domains=(example.org www.example.org) rsa_key_size=4096 data_path=\".\/data\/certbot\" email=\"\" # Adding a valid address is strongly recommended staging=1 # Set to 1 if you're testing your setup to avoid hitting request limits  if [ -d \"$data_path\" ]; then   read -p \"Existing data found for $domains. Continue and replace existing certificate? (y\/N) \" decision   if [ \"$decision\" != \"Y\" ] &amp;&amp; [ \"$decision\" != \"y\" ]; then     exit   fi fi   if [ ! -e \"$data_path\/conf\/options-ssl-nginx.conf\" ] || [ ! -e \"$data_path\/conf\/ssl-dhparams.pem\" ]; then   echo \"### Downloading recommended TLS parameters ...\"   mkdir -p \"$data_path\/conf\"   curl -s https:\/\/raw.githubusercontent.com\/certbot\/certbot\/master\/certbot-nginx\/certbot_nginx\/_internal\/tls_configs\/options-ssl-nginx.conf > \"$data_path\/conf\/options-ssl-nginx.conf\"   curl -s https:\/\/raw.githubusercontent.com\/certbot\/certbot\/master\/certbot\/certbot\/ssl-dhparams.pem > \"$data_path\/conf\/ssl-dhparams.pem\"   echo fi  echo \"### Creating dummy certificate for $domains ...\" path=\"\/etc\/letsencrypt\/live\/$domains\" mkdir -p \"$data_path\/conf\/live\/$domains\" docker-compose run --rm --entrypoint \"\\   openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\\     -keyout '$path\/privkey.pem' \\     -out '$path\/fullchain.pem' \\     -subj '\/CN=localhost'\" certbot echo   echo \"### Starting nginx ...\" docker-compose up --force-recreate -d nginx echo  echo \"### Deleting dummy certificate for $domains ...\" docker-compose run --rm --entrypoint \"\\   rm -Rf \/etc\/letsencrypt\/live\/$domains &amp;&amp; \\   rm -Rf \/etc\/letsencrypt\/archive\/$domains &amp;&amp; \\   rm -Rf \/etc\/letsencrypt\/renewal\/$domains.conf\" certbot echo   echo \"### Requesting Let's Encrypt certificate for $domains ...\" #Join $domains to -d args domain_args=\"\" for domain in \"${domains[@]}\"; do   domain_args=\"$domain_args -d $domain\" done  # Select appropriate email arg case \"$email\" in   \"\") email_arg=\"--register-unsafely-without-email\" ;;   *) email_arg=\"--email $email\" ;; esac  # Enable staging mode if needed if [ $staging != \"0\" ]; then staging_arg=\"--staging\"; fi  docker-compose run --rm --entrypoint \"\\   certbot certonly --webroot -w \/var\/www\/certbot \\     $staging_arg \\     $email_arg \\     $domain_args \\     --rsa-key-size $rsa_key_size \\     --agree-tos \\     --force-renewal\" certbot echo  echo \"### Reloading nginx ...\" docker-compose exec nginx nginx -s reload<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 <code>init-letsencrypt.sh<\/code>\u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 8, 11 \u0438 12 \u0441\u0442\u0440\u043e\u0447\u043a\u0435. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>staging<\/code> \u043b\u0443\u0447\u0448\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c 1, \u043f\u043e\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u0430\u0448\u0435 DNS \u0438\u043c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b, \u0434\u0435\u0444\u0438\u0441 \u0438 \u0446\u0438\u0444\u0440\u044b, \u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0434\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Punycode\">Punycode<\/a>.<\/p>\n<p>\u0415\u0449\u0451 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0444\u0430\u0439\u043b\u044b <code>docker-compose.yml<\/code> \u0438 <code>nginx.conf<\/code>. \u0412 \u0444\u0430\u0439\u043b\u0435 <code>docker-compose.yml<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 <code>certbot<\/code>, \u0430 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 <code>nginx<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u0449\u0438\u0435 \u0441 <code>certbot<\/code>  <code>volumes<\/code>, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c 443 \u043f\u043e\u0440\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u043a\u0446\u0438\u044e <code>command<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 nginx \u043a\u0430\u0436\u0434\u044b\u0435 6 \u0447\u0430\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c.  \u0421\u0435\u0440\u0432\u0438\u0441  <code>certbot<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Let&#8217;s Encrypt \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>docker-compose.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">version: '3.8'  services:   simple-server:     container_name: simple-server     image: simple-server     restart: unless-stopped     networks:       nginx_net:    nginx:     container_name: nginx     image: nginx:1.21.1     restart: unless-stopped     volumes:       - .\/data\/nginx.conf:\/etc\/nginx\/conf.d\/default.conf       - .\/data\/certbot\/conf:\/etc\/letsencrypt       - .\/data\/certbot\/www:\/var\/www\/certbot     ports:       - 80:80       - 443:443     command: \"\/bin\/sh -c 'while :; do sleep 6h &amp; wait $${!}; nginx -s reload; done &amp; nginx -g \\\"daemon off;\\\"'\"     networks:       nginx_net:    certbot:     container_name: certbot     image: certbot\/certbot:v1.17.0     restart: unless-stopped     entrypoint:  \"\/bin\/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h &amp; wait $${!}; done;'\"     networks:       nginx_net:     volumes:       - .\/data\/certbot\/conf:\/etc\/letsencrypt       - .\/data\/certbot\/www:\/var\/www\/certbot  networks:   nginx_net: <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041d\u043e \u0435\u0449\u0451 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b <code>nginx.conf<\/code>, \u0432 \u043d\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f <code>location<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a <code>certbot<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>nginx.conf<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\">server {   resolver     127.0.0.11;   listen       80; # public server port      location \/.well-known\/acme-challenge\/ { root \/var\/www\/certbot; }    set $simple_server_url http:\/\/simple-server:8000;    location \/ {     proxy_pass $simple_server_url;   } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 <code>init-letsencrypt.sh<\/code> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>staging=1<\/code>. \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>staging=0<\/code>. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a, \u0430 \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u0431\u044b\u043b\u043e \u043f\u0430\u0440\u0443 \u0440\u0430\u0437, \u0442\u043e \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0430 nginx.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c <code>docker-compose.yml<\/code> \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0431\u0449\u0438\u0445 <code>volume<\/code> \u0443 <code>nginx<\/code> \u0438 <code>certbot<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c <code>set -x<\/code> \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430 (\u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b).<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 <code>init-letsencrypt.sh<\/code> \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>--rm<\/code> \u0432 69 \u0441\u0442\u0440\u043e\u0447\u043a\u0435, \u0442\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u0441\u044f \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u043b\u043e\u0433. \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>-v<\/code> \u043f\u0435\u0440\u0435\u0434 <code>\\<\/code> \u0432 73<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-409587","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/409587","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=409587"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/409587\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=409587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=409587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=409587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}