{"id":326241,"date":"2021-07-10T09:00:20","date_gmt":"2021-07-10T09:00:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326241"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326241","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442 \u0438\u043b\u0438 \u0431\u043b\u043e\u0433 \u043d\u0430 Ghost \u0432 \u043e\u0431\u0440\u0430\u0437\u0435 Docker"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0424\u0438\u0448\u043a\u043e\u0439 Ghost \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0431\u0435\u043a\u0435\u043d\u0434\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 Node.js \u0438 \u044f\u0437\u044b\u043a JavaScript \u0438 \u0434\u0430\u0435\u0442 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u0431\u043b\u043e\u0433 \u043d\u0430 Ghost \u2014 \u0434\u0432\u0438\u0436\u043a\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 MariaDB \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/ghost.org\/\" rel=\"noopener noreferrer nofollow\"><strong>Ghost<\/strong><\/a>&nbsp;\u2014 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0434\u043b\u044f \u0431\u043b\u043e\u0433\u0438\u043d\u043a\u0430 \u043d\u0430 Node.js<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.nginx.com\/\" rel=\"noopener noreferrer nofollow\"><strong>Nginx<\/strong><\/a><strong>&nbsp;\u2014&nbsp;<\/strong>\u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043f\u043e\u0440\u0442 \u0431\u043b\u043e\u0433\u0430<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/mariadb.org\/\" rel=\"noopener noreferrer nofollow\"><strong>MariaDB<\/strong><\/a>&nbsp;\u2014 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0411\u0414 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer nofollow\"><strong>Docker<\/strong><\/a>&nbsp;\u2014 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Docker \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043b\u0438 \u043b\u0438\u0447\u043d\u044b\u0439 \u041f\u041a, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b Docker \u0438 Compose. \u041d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044f \u043f\u0440\u043e \u044d\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0442\u043e\u043c\u043b\u044f\u0442\u044c \u0438 \u043e\u0442\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0435\u043c\u044b. \u0421\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0432 \u043a\u0443\u0440\u0441\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Docker \u0438 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Nginx, \u0445\u043e\u0442\u044f, \u043e\u043d \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u0439\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0445\u043e\u0441\u0442\u0430<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430, \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u044b \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u042f \u0436 \u0431\u0443\u0434\u0443 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f Linux \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435&nbsp;<strong>Ubuntu<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b Docker, Compose, Nginx: <\/p>\n<pre><code class=\"bash\">$ sudo apt install docker docker-compose nginx<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438, \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0435\u0437 \u043f\u043e\u043b\u043d\u043e\u043c\u043e\u0447\u0438\u0439&nbsp;<strong>root<\/strong>&nbsp;\u0438 \u0447\u0442\u043e \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0435&nbsp;<strong>docker<\/strong>, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043e\u043a\u0435\u0440\u0430 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0445\u043e\u0442\u044f, \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e, \u043d\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439:  <\/p>\n<pre><code class=\"bash\">$ sudo usermod username -aG docker<\/code><\/pre>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0438\u0448\u0435\u043c \u0432\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>docker-compose.yml<\/strong>  <\/p>\n<pre><code class=\"yaml\">version: '3.3'  services:   mariadb:     container_name: project_mariadb     image: mariadb:${MARIADB_IMAGE_TAG}     environment:       MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}       MYSQL_USER: ghost       MYSQL_PASSWORD: ${MYSQL_PASSWORD}       MYSQL_DATABASE: ghost_production     restart: always     volumes:       - type: bind         source: ${MYSQL_HOST_PATH}         target: \/var\/lib\/mysql    ghost:     container_name: project_ghost     image: ghost:${GHOST_IMAGE_TAG}     ports:         - 8022:2368     environment:       url: ${BLOG_URL:-http:\/\/127.0.0.1}       database__client: mysql       database__connection__host: mariadb       database__connection__database: ghost_production       database__connection__user: ghost       database__connection__password: ${MYSQL_PASSWORD}     depends_on:       - mariadb     restart: always     volumes:       - type: bind         source: ${GHOST_HOST_PATH}         target: \/var\/lib\/ghost\/content<\/code><\/pre>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0432\u044b\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 2 \u043e\u0431\u0440\u0430\u0437\u0430  <\/p>\n<ul>\n<li>\n<p>ghost<\/p>\n<\/li>\n<li>\n<p>mariadb<\/p>\n<\/li>\n<\/ul>\n<p>Ghost \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u043d\u0430\u0440\u0443\u0436\u0443 \u043f\u043e \u043f\u043e\u0440\u0442\u0443&nbsp;<strong>8022<\/strong>&nbsp;\u0438 \u0447\u0435\u0440\u0435\u0437 \u0432\u043e\u043b\u044c\u044e\u043c \u043f\u0443\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430&nbsp;<strong>source<\/strong>, \u043e\u0442\u043a\u0443\u0434\u0430 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441 \u0445\u043e\u0441\u0442\u0430 \u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043e\u0431\u0440\u0430\u0437 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432 \u0444\u0430\u0439\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043e\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u0444\u0430\u0439\u043b \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <strong>.env<\/strong>, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043a \u043d\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0434\u0430 \u0438 \u043b\u0435\u0433\u043a\u043e \u044d\u0442\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u0443 \u043d\u0430\u0441 \u0442\u0430\u043a<\/p>\n<pre><code class=\"bash\"># \u0422\u0435\u0433 \u0434\u043b\u044f ghost \u043e\u0431\u0440\u0430\u0437\u0430 export GHOST_IMAGE_TAG=latest # \u0422\u0435\u0433 \u0434\u043b\u044f MariaDB \u043e\u0431\u0440\u0430\u0437\u0430 export MARIADB_IMAGE_TAG=latest # \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 url \u0434\u043b\u044f \u0431\u043b\u043e\u0433\u0430 ghost export BLOG_URL=http:\/\/127.0.0.1:8022 # Root - \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f MariaDB export MYSQL_ROOT_PASSWORD=password # User - \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f ghost \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0432 \u0411\u0414 export MYSQL_PASSWORD=password # Host - \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0433\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 export MYSQL_HOST_PATH=.\/mariadb export GHOST_HOST_PATH=.\/www<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432 \u043a\u043e\u0440\u043d\u0435, \u0433\u0434\u0435 \u0444\u0430\u0439\u043b docker-compose.yml \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443  <\/p>\n<pre><code class=\"bash\">$ docker-compose up -d<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u043f\u043e\u0440\u0442\u0443&nbsp;<strong>localhost:8022<\/strong>  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b05\/007\/b66\/b05007b668a2b1e84fbd2269ec333b9d.png\" alt=\"\u041d\u0430\u0448 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u043b\u043e\u0433\" title=\"\u041d\u0430\u0448 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u043b\u043e\u0433\" width=\"1900\" height=\"974\"><figcaption>\u041d\u0430\u0448 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u043b\u043e\u0433<\/figcaption><\/figure>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Nginx<\/h3>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443&nbsp;<strong>localhost:8022<\/strong>, \u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d \u0434\u043e\u043c\u0435\u043d, \u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u043e\u0440\u0442\u0430&nbsp;<strong>80<\/strong>&nbsp;\u0438\u043b\u0438&nbsp;<strong>443<\/strong>&nbsp;\u043d\u0430 \u043f\u043e\u0440\u0442&nbsp;<strong>8022<\/strong>, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0441\u0430\u0439\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0443&nbsp;<strong>\/etc\/nginx\/sites-available\/site.com.conf<\/strong>&nbsp;\u0438 \u0434\u0430\u043b\u0435\u0435 \u0434\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u043f\u0430\u043f\u043a\u0443<strong>&nbsp;\/etc\/nginx\/sites-enabled<\/strong>  <\/p>\n<pre><code class=\"bash\">$ ln -s \/etc\/nginx\/sites-available\/site.com.conf \/etc\/nginx\/sites-enabled\/site.com.conf<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e, \u0434\u043e\u043b\u0436\u0435\u043d \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<pre><code class=\"nginx\">server {     server_name site.com www.site.com;          error_log \/var\/www\/site\/logs\/error.log;     access_log \/var\/www\/site\/logs\/access.log;      location \/{         proxy_pass http:\/\/localhost:8022;         proxy_http_version 1.1;         proxy_set_header Upgrade $http_upgrade;         proxy_set_header Connection 'upgrade';         proxy_set_header Host $host;         proxy_cache_bypass $http_upgrade;     }  }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0443 \u043d\u0430\u0441, \u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u043e\u0440\u0442\u0430 80 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0440\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 Ghost, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c, \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u044e\u0437\u0435\u0440\u043e\u0432 \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043d\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0443 80<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c nginx<\/p>\n<pre><code class=\"bash\">$ systemctl restart nginx<\/code><\/pre>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0443 site.com \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430&nbsp;<a href=\"https:\/\/gist.github.com\/WebSofter\/742f0a009ad61b7b4f2b8193b6e462e1\" rel=\"noopener noreferrer nofollow\">gist<\/a>.  <\/p>\n<p>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 <a href=\"https:\/\/wsofter.ru\/deploj-proekta-na-dvizhke-ghost-na-docker\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0430\u0439\u0442\u0435<\/a>. <\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/567002\/\"> https:\/\/habr.com\/ru\/post\/567002\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0424\u0438\u0448\u043a\u043e\u0439 Ghost \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0431\u0435\u043a\u0435\u043d\u0434\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 Node.js \u0438 \u044f\u0437\u044b\u043a JavaScript \u0438 \u0434\u0430\u0435\u0442 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u0431\u043b\u043e\u0433 \u043d\u0430 Ghost \u2014 \u0434\u0432\u0438\u0436\u043a\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 MariaDB \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/ghost.org\/\" rel=\"noopener noreferrer nofollow\"><strong>Ghost<\/strong><\/a>&nbsp;\u2014 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0434\u043b\u044f \u0431\u043b\u043e\u0433\u0438\u043d\u043a\u0430 \u043d\u0430 Node.js<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.nginx.com\/\" rel=\"noopener noreferrer nofollow\"><strong>Nginx<\/strong><\/a><strong>&nbsp;\u2014&nbsp;<\/strong>\u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043f\u043e\u0440\u0442 \u0431\u043b\u043e\u0433\u0430<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/mariadb.org\/\" rel=\"noopener noreferrer nofollow\"><strong>MariaDB<\/strong><\/a>&nbsp;\u2014 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0411\u0414 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer nofollow\"><strong>Docker<\/strong><\/a>&nbsp;\u2014 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Docker \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043b\u0438 \u043b\u0438\u0447\u043d\u044b\u0439 \u041f\u041a, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b Docker \u0438 Compose. \u041d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044f \u043f\u0440\u043e \u044d\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0442\u043e\u043c\u043b\u044f\u0442\u044c \u0438 \u043e\u0442\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0435\u043c\u044b. \u0421\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0432 \u043a\u0443\u0440\u0441\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Docker \u0438 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Nginx, \u0445\u043e\u0442\u044f, \u043e\u043d \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u0439\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0445\u043e\u0441\u0442\u0430<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430, \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u044b \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u042f \u0436 \u0431\u0443\u0434\u0443 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f Linux \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435&nbsp;<strong>Ubuntu<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b Docker, Compose, Nginx: <\/p>\n<pre><code class=\"bash\">$ sudo apt install docker docker-compose nginx<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438, \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0435\u0437 \u043f\u043e\u043b\u043d\u043e\u043c\u043e\u0447\u0438\u0439&nbsp;<strong>root<\/strong>&nbsp;\u0438 \u0447\u0442\u043e \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0435&nbsp;<strong>docker<\/strong>, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043e\u043a\u0435\u0440\u0430 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0445\u043e\u0442\u044f, \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e, \u043d\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439:  <\/p>\n<pre><code class=\"bash\">$ sudo usermod username -aG docker<\/code><\/pre>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0438\u0448\u0435\u043c \u0432\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>docker-compose.yml<\/strong>  <\/p>\n<pre><code class=\"yaml\">version: '3.3'  services:   mariadb:     container_name: project_mariadb     image: mariadb:${MARIADB_IMAGE_TAG}     environment:       MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}       MYSQL_USER: ghost       MYSQL_PASSWORD: ${MYSQL_PASSWORD}       MYSQL_DATABASE: ghost_production     restart: always     volumes:       - type: bind         source: ${MYSQL_HOST_PATH}         target: \/var\/lib\/mysql    ghost:     container_name: project_ghost     image: ghost:${GHOST_IMAGE_TAG}     ports:         - 8022:2368     environment:       url: ${BLOG_URL:-http:\/\/127.0.0.1}       database__client: mysql       database__connection__host: mariadb       database__connection__database: ghost_production       database__connection__user: ghost       database__connection__password: ${MYSQL_PASSWORD}     depends_on:       - mariadb     restart: always     volumes:       - type: bind         source: ${GHOST_HOST_PATH}         target: \/var\/lib\/ghost\/content<\/code><\/pre>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0432\u044b\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 2 \u043e\u0431\u0440\u0430\u0437\u0430  <\/p>\n<ul>\n<li>\n<p>ghost<\/p>\n<\/li>\n<li>\n<p>mariadb<\/p>\n<\/li>\n<\/ul>\n<p>Ghost \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u043d\u0430\u0440\u0443\u0436\u0443 \u043f\u043e \u043f\u043e\u0440\u0442\u0443&nbsp;<strong>8022<\/strong>&nbsp;\u0438 \u0447\u0435\u0440\u0435\u0437 \u0432\u043e\u043b\u044c\u044e\u043c \u043f\u0443\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430&nbsp;<strong>source<\/strong>, \u043e\u0442\u043a\u0443\u0434\u0430 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441 \u0445\u043e\u0441\u0442\u0430 \u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043e\u0431\u0440\u0430\u0437 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432 \u0444\u0430\u0439\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043e\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u0444\u0430\u0439\u043b \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <strong>.env<\/strong>, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043a \u043d\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0434\u0430 \u0438 \u043b\u0435\u0433\u043a\u043e \u044d\u0442\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u0443 \u043d\u0430\u0441 \u0442\u0430\u043a<\/p>\n<pre><code class=\"bash\"># \u0422\u0435\u0433 \u0434\u043b\u044f ghost \u043e\u0431\u0440\u0430\u0437\u0430 export GHOST_IMAGE_TAG=latest # \u0422\u0435\u0433 \u0434\u043b\u044f MariaDB \u043e\u0431\u0440\u0430\u0437\u0430 export MARIADB_IMAGE_TAG=latest # \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 url \u0434\u043b\u044f \u0431\u043b\u043e\u0433\u0430 ghost export BLOG_URL=http:\/\/127.0.0.1:8022 # Root - \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f MariaDB export MYSQL_ROOT_PASSWORD=password # User - \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f ghost \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0432 \u0411\u0414 export MYSQL_PASSWORD=password # Host - \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0433\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 export MYSQL_HOST_PATH=.\/mariadb export GHOST_HOST_PATH=.\/www<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432 \u043a\u043e\u0440\u043d\u0435, \u0433\u0434\u0435 \u0444\u0430\u0439\u043b docker-compose.yml \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443  <\/p>\n<pre><code class=\"bash\">$ docker-compose up -d<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u043f\u043e\u0440\u0442\u0443&nbsp;<strong>localhost:8022<\/strong>  <\/p>\n<figure class=\"full-width\"><figcaption>\u041d\u0430\u0448 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u043b\u043e\u0433<\/figcaption><\/figure>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Nginx<\/h3>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443&nbsp;<strong>localhost:8022<\/strong>, \u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d \u0434\u043e\u043c\u0435\u043d, \u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u043e\u0440\u0442\u0430&nbsp;<strong>80<\/strong>&nbsp;\u0438\u043b\u0438&nbsp;<strong>443<\/strong>&nbsp;\u043d\u0430 \u043f\u043e\u0440\u0442&nbsp;<strong>8022<\/strong>, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0441\u0430\u0439\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0443&nbsp;<strong>\/etc\/nginx\/sites-available\/site.com.conf<\/strong>&nbsp;\u0438 \u0434\u0430\u043b\u0435\u0435 \u0434\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u043f\u0430\u043f\u043a\u0443<strong>&nbsp;\/etc\/nginx\/sites-enabled<\/strong>  <\/p>\n<pre><code class=\"bash\">$ ln -s \/etc\/nginx\/sites-available\/site.com.conf \/etc\/nginx\/sites-enabled\/site.com.conf<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e, \u0434\u043e\u043b\u0436\u0435\u043d \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<pre><code class=\"nginx\">server {     server_name site.com www.site.com;          error_log \/var\/www\/site\/logs\/error.log;     access_log \/var\/www\/site\/logs\/access.log;      location \/{         proxy_pass http:\/\/localhost:8022;         proxy_http_version 1.1;         proxy_set_header Upgrade $http_upgrade;         proxy_set_header Connection 'upgrade';         proxy_set_header Host $host;         proxy_cache_bypass $http_upgrade;     }  }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0443 \u043d\u0430\u0441, \u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u043e\u0440\u0442\u0430 80 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0440\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 Ghost, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c, \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u044e\u0437\u0435\u0440\u043e\u0432 \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043d\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0443 80<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c nginx<\/p>\n<pre><code class=\"bash\">$ systemctl restart nginx<\/code><\/pre>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0443 site.com \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430&nbsp;<a href=\"https:\/\/gist.github.com\/WebSofter\/742f0a009ad61b7b4f2b8193b6e462e1\" rel=\"noopener noreferrer nofollow\">gist<\/a>.  <\/p>\n<p>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 <a href=\"https:\/\/wsofter.ru\/deploj-proekta-na-dvizhke-ghost-na-docker\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0430\u0439\u0442\u0435<\/a>. <\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/567002\/\"> https:\/\/habr.com\/ru\/post\/567002\/<\/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-326241","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326241","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=326241"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326241\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}