{"id":346975,"date":"2023-03-19T15:01:14","date_gmt":"2023-03-19T15:01:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=346975"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=346975","title":{"rendered":"<span>\u041a\u043e\u0434 \u043d\u0430 python, \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 Cron. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u0434 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/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><strong>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u00ab\u0421\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e\u0441\u0442\u043e\u0432 \u0432 vk \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441\u00bb. \u042f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u0438\u043b\u0438 DevOps \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u0441\u044f \u0438\u0437 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430, \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u0434\u0440\u0443\u0437\u0435\u0439 \u0438 \u043a\u043e\u043b\u043b\u0435\u0433.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044f \u0440\u0430\u0437\u0431\u0438\u043b \u043d\u0430 2 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430. (\u0441\u043c. \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/post\/720862\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/720862\/<\/a>) <\/p>\n<\/li>\n<li>\n<p> \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c 1 \u0447\u0430\u0441<\/p>\n<\/li>\n<\/ol>\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 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e 2-\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 2 \u043f\u0443\u043d\u043a\u0442\u0430 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e.<\/p>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/983\/ff2\/bc5\/983ff2bc513a2c9bcadef8d7fb2ceb2f.jpg\" alt=\"\u041a\u043e\u0434 \u043d\u0430 python \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 github, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c docker. \u0412 crontab \u0437\u0430\u0434\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\" title=\"\u041a\u043e\u0434 \u043d\u0430 python \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 github, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c docker. \u0412 crontab \u0437\u0430\u0434\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\" width=\"391\" height=\"323\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/983\/ff2\/bc5\/983ff2bc513a2c9bcadef8d7fb2ceb2f.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041a\u043e\u0434 \u043d\u0430 python \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 github, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c docker. \u0412 crontab \u0437\u0430\u0434\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f Docker<\/strong><\/p>\n<p>\u041f\u0440\u043e Docker \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0435 \u0440\u0430\u0437, \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 Docker \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u043e \u0442\u0435\u043c\u0435 Docker, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433 \u043c\u043d\u0435.<\/p>\n<p>\u041f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b requrements.txt<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Dockerfile<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u0434\u0435 python <\/p>\n<\/li>\n<li>\n<p>\u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 google sheet api*<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a96\/42f\/7a3\/a9642f7a3e9c64ace8b266d36d589c40.JPG\" alt=\"* noted-point \u0444\u0430\u0439\u043b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c json, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430 python\" title=\"* noted-point \u0444\u0430\u0439\u043b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c json, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430 python\" width=\"294\" height=\"178\"\/><\/p>\n<div><figcaption>* noted-point \u0444\u0430\u0439\u043b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c json, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430 python<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p><strong>requrements.txt <\/strong>\u00a0<\/p>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c<strong> requrements.txt <\/strong>\u00a0\u042d\u0442\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c Docker, <u>\u043a\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043a\u0430\u043a\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/u>.<\/p>\n<p>\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0443\u0434\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c? <\/p>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u043c \u0432 \u0444\u0430\u0439\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043a\u043e\u0434\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435. <\/p>\n<pre><code class=\"python\">import os import requests  from pandas import json_normalize import pandas as pd from datetime import datetime from datetime import * import httplib2  from oauth2client.service_account import ServiceAccountCredentials import apiclient.discovery<\/code><\/pre>\n<p>\u0412  <abbr class=\"habraabbr\" title=\"\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\" data-title=\"&lt;p>&lt;strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438&lt;\/strong>  &lt;\/p>&#187; data-abbr=&#187;IDE&#187;>IDE<\/abbr> \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0435 \u043f\u0438\u0448\u0435\u043c <strong>pip freeze<\/strong>.<br \/>\u0412\u0438\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0432\u0430\u0448\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0438<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/394\/3ac\/900\/3943ac900df16ee0c87e4ae35918aebe.jpg\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0438\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0438\" width=\"179\" height=\"72\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/394\/3ac\/900\/3943ac900df16ee0c87e4ae35918aebe.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p><u>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0432 <\/u><strong><u>requrements.txt <\/u><\/strong><\/p>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/836\/b81\/8ed\/836b818edfb3d2747a2dac83fa1e497f.jpg\" alt=\"\u041d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 requrements.txt\" title=\"\u041d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 requrements.txt\" width=\"327\" height=\"109\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/836\/b81\/8ed\/836b818edfb3d2747a2dac83fa1e497f.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 requrements.txt<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p><strong>Dockerfile<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8e1\/8f4\/d80\/8e18f4d80c705db4ef75aef83bcda821.png\" alt=\"\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043e\u043a\u0435\u0440 \u0444\u0430\u0439\u043b\u0430\" title=\"\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043e\u043a\u0435\u0440 \u0444\u0430\u0439\u043b\u0430\" width=\"543\" height=\"295\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e1\/8f4\/d80\/8e18f4d80c705db4ef75aef83bcda821.png\"\/><\/p>\n<div><figcaption>\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043e\u043a\u0435\u0440 \u0444\u0430\u0439\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b Dockerfile, \u0431\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0438 \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<p><strong>FROM<\/strong> python: \u00ab\u0432\u0430\u0448\u0430 \u0432\u0435\u0440\u0441\u0438\u044f python\u00bb. \u0423\u0437\u043d\u0430\u0442\u044c \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u0440\u0430\u0432 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435: python \u2013V<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u043c \u043d\u0435 \u0431\u0443\u0434\u0443. \u0412\u044b\u0448\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 requrements.txt \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 RUN.<\/p>\n<p><strong>ENV<\/strong> \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 Docker. ENV TZ Europe\/Moscow \u2013 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434\u0430. (\u0441\u043c. \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/post\/720862\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/720862\/<\/a>)<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0445 \u0438 \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0434\u0435. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p><strong>CMD<\/strong> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e vk_stat.py<\/p>\n<hr\/>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u0434\u0435 python<\/strong><\/p>\n<p>\u041c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0432 Dockerfile.<br \/>\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">TOKEN_USER = os.getenv('TOKEN_USER') VERSION = os.getenv('VERSION') DOMAIN = os.getenv('DOMAIN')<\/code><\/pre>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043a\u043e\u0434 \u043d\u0430 GitHub<\/strong><\/p>\n<p>\u042f \u0431\u044b \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u044d\u0442\u043e\u043c\u0443 \u0448\u0430\u0433\u0443 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e docker desktop \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0432\u0438\u0434\u0435\u043e \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 docker \u0438 \u043a\u0440\u0430\u0442\u043a\u043e \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041c\u043d\u0435 \u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u043b\u043e. <a href=\"https:\/\/www.youtube.com\/watch?v=QF4ZF857m44\" rel=\"noopener noreferrer nofollow\">https:\/\/www.youtube.com\/watch?v=QF4ZF857m44<\/a><\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e c Docker \u0437\u043d\u0430\u043a\u043e\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432\u0438\u0434\u0435\u043e (\u0441\u0441\u044b\u043b\u043a\u0430 \u0432\u044b\u0448\u0435) <strong><u>\u0441 <\/u><\/strong><a href=\"https:\/\/www.youtube.com\/watch?v=QF4ZF857m44&amp;t=3923s\" rel=\"noopener noreferrer nofollow\"><strong><u>1:05:23<\/u><\/strong><\/a><strong><u> \u043f\u043e <\/u><\/strong><a href=\"https:\/\/www.youtube.com\/watch?v=QF4ZF857m44&amp;t=4217s\" rel=\"noopener noreferrer nofollow\"><strong><u>1:10:17<\/u><\/strong><\/a> <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044e \u043b\u0438\u0448\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, <u>\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub! <\/u><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u0448\u0430\u0433\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0437\u0430 \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0432\u0438\u0434\u0435\u043e. <\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/641702af61f0ac6fb2762ed1\" data-style=\"\" id=\"641702af61f0ac6fb2762ed1\" width=\"\"><\/div>\n<p>90% \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0430\u043c\u0438 \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e. \u041f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u0443 \u0432\u0430\u0441:<\/p>\n<p>&#8212; \u0421\u043e\u0437\u0434\u0430\u043d \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u043e\u043c \u0447\u0435\u0440\u0435\u0437 github + \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 docker <\/p>\n<p><strong>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 Cron<\/strong><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u041c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e cron \u0437\u0434\u0435\u0441\u044c <a href=\"https:\/\/losst.pro\/nastrojka-cron\" rel=\"noopener noreferrer nofollow\">https:\/\/losst.pro\/nastrojka-cron<\/a>, \u043d\u043e \u0434\u0430\u043b\u0435\u0435 \u043a\u0440\u0430\u0442\u043a\u043e \u043d\u0430\u043f\u0438\u0448\u0443 \u043f\u043e \u0441\u0443\u0442\u0438. \u041d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u00abcrontab \u2013e\u00bb \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n<p>\u0412 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441. \u0412 \u043f\u043e\u043c\u043e\u0449\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u0430\u0439\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b <a href=\"https:\/\/crontab.guru\" rel=\"noopener noreferrer nofollow\">https:\/\/crontab.guru<\/a><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 Docker run \u2013rm \u00ab\u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430\u00bb. \u0424\u043b\u0430\u0436\u043e\u043a \u2013rm \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2be\/897\/5fd\/2be8975fdc8e1c9ee2b936025ca6cadb.png\" alt=\"Cron \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c. test - \u0438\u043c\u044f \u043c\u043e\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430\" title=\"Cron \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c. test - \u0438\u043c\u044f \u043c\u043e\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430\" width=\"1088\" height=\"590\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2be\/897\/5fd\/2be8975fdc8e1c9ee2b936025ca6cadb.png\"\/><\/p>\n<div><figcaption>Cron \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c. test &#8212; \u0438\u043c\u044f \u043c\u043e\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0435 \u043f\u0430\u0434\u0430\u0435\u0442 \u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0432 \u043b\u043e\u0433\u0430\u0445. \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 grep CRON \/var\/log\/syslog <\/p>\n<p><strong>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0438 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u043c\u043d\u043e\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. <\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 200 \u0440\u0443\u0431\u043b\u0435\u0439 \u0437\u0430 \u043c\u0435\u0441\u044f\u0446 \u0430\u0440\u0435\u043d\u0434\u044b. \u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c<br \/> \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 4-6 \u043c\u0435\u0441\u044f\u0446\u0435\u0432. \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u0436\u0435<br \/> \u0441\u0430\u043c\u043e\u0435 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c. <\/p>\n<p><a href=\"https:\/\/github.com\/DmitriyBarinovTwo\/ServerCronPython\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u0434 \u043d\u0430 GitHub<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/723390\/\"> https:\/\/habr.com\/ru\/post\/723390\/<\/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><strong>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u00ab\u0421\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e\u0441\u0442\u043e\u0432 \u0432 vk \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441\u00bb. \u042f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u0438\u043b\u0438 DevOps \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u0441\u044f \u0438\u0437 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430, \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u0434\u0440\u0443\u0437\u0435\u0439 \u0438 \u043a\u043e\u043b\u043b\u0435\u0433.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044f \u0440\u0430\u0437\u0431\u0438\u043b \u043d\u0430 2 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430. (\u0441\u043c. \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/post\/720862\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/720862\/<\/a>) <\/p>\n<\/li>\n<li>\n<p> \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c 1 \u0447\u0430\u0441<\/p>\n<\/li>\n<\/ol>\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 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e 2-\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 2 \u043f\u0443\u043d\u043a\u0442\u0430 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e.<\/p>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<figure class=\"bordered\">\n<div><figcaption>\u041a\u043e\u0434 \u043d\u0430 python \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 github, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c docker. \u0412 crontab \u0437\u0430\u0434\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f Docker<\/strong><\/p>\n<p>\u041f\u0440\u043e Docker \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0435 \u0440\u0430\u0437, \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 Docker \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u043e \u0442\u0435\u043c\u0435 Docker, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433 \u043c\u043d\u0435.<\/p>\n<p>\u041f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b requrements.txt<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Dockerfile<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u0434\u0435 python <\/p>\n<\/li>\n<li>\n<p>\u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 google sheet api*<\/p>\n<\/li>\n<\/ol>\n<figure class=\"\">\n<div><figcaption>* noted-point \u0444\u0430\u0439\u043b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c json, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430 python<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p><strong>requrements.txt <\/strong>\u00a0<\/p>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c<strong> requrements.txt <\/strong>\u00a0\u042d\u0442\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c Docker, <u>\u043a\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043a\u0430\u043a\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/u>.<\/p>\n<p>\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0443\u0434\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c? <\/p>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u043c \u0432 \u0444\u0430\u0439\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043a\u043e\u0434\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435. <\/p>\n<pre><code class=\"python\">import os import requests  from pandas import json_normalize import pandas as pd from datetime import datetime from datetime import * import httplib2  from oauth2client.service_account import ServiceAccountCredentials import apiclient.discovery<\/code><\/pre>\n<p>\u0412  <abbr class=\"habraabbr\" title=\"\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\" data-title=\"&lt;p>\u0431\u043e\u0442\u043a\u0438&#187; data-title=&#187;&lt;p>&lt;strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438&lt;\/strong>  &lt;\/p>&#187; data-abbr=&#187;IDE&#187;>IDE<\/abbr> \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0435 \u043f\u0438\u0448\u0435\u043c <strong>pip freeze<\/strong>.<br \/>\u0412\u0438\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0432\u0430\u0448\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0438<\/p>\n<figure class=\"bordered\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p><u>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0432 <\/u><strong><u>requrements.txt <\/u><\/strong><\/p>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"bordered\">\n<div><figcaption>\u041d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 requrements.txt<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p><strong>Dockerfile<\/strong><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043e\u043a\u0435\u0440 \u0444\u0430\u0439\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b Dockerfile, \u0431\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0438 \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<p><strong>FROM<\/strong> python: \u00ab\u0432\u0430\u0448\u0430 \u0432\u0435\u0440\u0441\u0438\u044f python\u00bb. \u0423\u0437\u043d\u0430\u0442\u044c \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u0440\u0430\u0432 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435: python \u2013V<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u043c \u043d\u0435 \u0431\u0443\u0434\u0443. \u0412\u044b\u0448\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 requrements.txt \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 RUN.<\/p>\n<p><strong>ENV<\/strong> \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 Docker. ENV TZ Europe\/Moscow \u2013 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434\u0430. (\u0441\u043c. \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/post\/720862\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/720862\/<\/a>)<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0445 \u0438 \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0434\u0435. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p><strong>CMD<\/strong> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e vk_stat.py<\/p>\n<hr\/>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u0434\u0435 python<\/strong><\/p>\n<p>\u041c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0432 Dockerfile.<br \/>\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">TOKEN_USER = os.getenv('TOKEN_USER') VERSION = os.getenv('VERSION') DOMAIN = os.getenv('DOMAIN')<\/code><\/pre>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043a\u043e\u0434 \u043d\u0430 GitHub<\/strong><\/p>\n<p>\u042f \u0431\u044b \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u044d\u0442\u043e\u043c\u0443 \u0448\u0430\u0433\u0443 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e docker desktop \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0432\u0438\u0434\u0435\u043e \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 docker \u0438 \u043a\u0440\u0430\u0442\u043a\u043e \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041c\u043d\u0435 \u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u043b\u043e. <a href=\"https:\/\/www.youtube.com\/watch?v=QF4ZF857m44\" rel=\"noopener noreferrer nofollow\">https:\/\/www.youtube.com\/watch?v=QF4ZF857m44<\/a><\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e c Docker \u0437\u043d\u0430\u043a\u043e\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432\u0438\u0434\u0435\u043e (\u0441\u0441\u044b\u043b\u043a\u0430 \u0432\u044b\u0448\u0435) <strong><u>\u0441 <\/u><\/strong><a href=\"https:\/\/www.youtube.com\/watch?v=QF4ZF857m44&amp;t=3923s\" rel=\"noopener noreferrer nofollow\"><strong><u>1:05:23<\/u><\/strong><\/a><strong><u> \u043f\u043e <\/u><\/strong><a href=\"https:\/\/www.youtube.com\/watch?v=QF4ZF857m44&amp;t=4217s\" rel=\"noopener noreferrer nofollow\"><strong><u>1:10:17<\/u><\/strong><\/a> <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044e \u043b\u0438\u0448\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, <u>\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub! <\/u><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u0448\u0430\u0433\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0437\u0430 \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0432\u0438\u0434\u0435\u043e. <\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/641702af61f0ac6fb2762ed1\" data-style=\"\" id=\"641702af61f0ac6fb2762ed1\" width=\"\"><\/div>\n<p>90% \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0430\u043c\u0438 \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e. \u041f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u0443 \u0432\u0430\u0441:<\/p>\n<p>&#8212; \u0421\u043e\u0437\u0434\u0430\u043d \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u043e\u043c \u0447\u0435\u0440\u0435\u0437 github + \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 docker <\/p>\n<p><strong>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 Cron<\/strong><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u041c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e cron \u0437\u0434\u0435\u0441\u044c <a href=\"https:\/\/losst.pro\/nastrojka-cron\" rel=\"noopener noreferrer nofollow\">https:\/\/losst.pro\/nastrojka-cron<\/a>, \u043d\u043e \u0434\u0430\u043b\u0435\u0435 \u043a\u0440\u0430\u0442\u043a\u043e \u043d\u0430\u043f\u0438\u0448\u0443 \u043f\u043e \u0441\u0443\u0442\u0438. \u041d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u00abcrontab \u2013e\u00bb \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n<p>\u0412 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441. \u0412 \u043f\u043e\u043c\u043e\u0449\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u0430\u0439\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b <a href=\"https:\/\/crontab.guru\" rel=\"noopener noreferrer nofollow\">https:\/\/crontab.guru<\/a><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 Docker run \u2013rm \u00ab\u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430\u00bb. \u0424\u043b\u0430\u0436\u043e\u043a \u2013rm \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>Cron \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c. test &#8212; \u0438\u043c\u044f \u043c\u043e\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0435 \u043f\u0430\u0434\u0430\u0435\u0442 \u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0432 \u043b\u043e\u0433\u0430\u0445. \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 grep CRON \/var\/log\/syslog <\/p>\n<p><strong>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0438 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u043c\u043d\u043e\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. <\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 200 \u0440\u0443\u0431\u043b\u0435\u0439 \u0437\u0430 \u043c\u0435\u0441\u044f\u0446 \u0430\u0440\u0435\u043d\u0434\u044b. \u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c<br \/> \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 4-6 \u043c\u0435\u0441\u044f\u0446\u0435\u0432. \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u0436\u0435<br \/> \u0441\u0430\u043c\u043e\u0435 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c. <\/p>\n<p><a href=\"https:\/\/github.com\/DmitriyBarinovTwo\/ServerCronPython\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u0434 \u043d\u0430 GitHub<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/723390\/\"> https:\/\/habr.com\/ru\/post\/723390\/<\/a><br \/><\/br><\/br><\/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-346975","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346975","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=346975"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346975\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}