{"id":26749,"date":"2026-07-15T06:26:19","date_gmt":"2026-07-15T06:26:19","guid":{"rendered":"https:\/\/umang.pk\/2026\/07\/15\/node-js-%d8%a7%db%8c%d9%be%d9%84%db%8c-%da%a9%db%8c%d8%b4%d9%86%d8%b2-%da%a9%d9%88-docker-%da%a9%db%92-%d8%b3%d8%a7%d8%aa%da%be-%da%a9%d9%86%d9%b9%db%8c%d9%86%d8%b1%d8%a7%d8%a6%d8%b2-%da%a9%d8%b1\/"},"modified":"2026-07-15T06:26:19","modified_gmt":"2026-07-15T06:26:19","slug":"node-js-%d8%a7%db%8c%d9%be%d9%84%db%8c-%da%a9%db%8c%d8%b4%d9%86%d8%b2-%da%a9%d9%88-docker-%da%a9%db%92-%d8%b3%d8%a7%d8%aa%da%be-%da%a9%d9%86%d9%b9%db%8c%d9%86%d8%b1%d8%a7%d8%a6%d8%b2-%da%a9%d8%b1","status":"publish","type":"post","link":"https:\/\/umang.pk\/ur\/2026\/07\/15\/node-js-%d8%a7%db%8c%d9%be%d9%84%db%8c-%da%a9%db%8c%d8%b4%d9%86%d8%b2-%da%a9%d9%88-docker-%da%a9%db%92-%d8%b3%d8%a7%d8%aa%da%be-%da%a9%d9%86%d9%b9%db%8c%d9%86%d8%b1%d8%a7%d8%a6%d8%b2-%da%a9%d8%b1\/","title":{"rendered":"Node.js \u0627\u06cc\u067e\u0644\u06cc \u06a9\u06cc\u0634\u0646\u0632 \u06a9\u0648 Docker \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0646\u0679\u06cc\u0646\u0631\u0627\u0626\u0632 \u06a9\u0631\u0646\u06d2 \u0627\u0648\u0631 GitHub \u0627\u06cc\u06a9\u0634\u0646\u0632 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1"},"content":{"rendered":"\n<div id=\"\">\n<p>\u0627\u06af\u0631 \u0622\u067e \u0646\u06d2 \u06a9\u0628\u06be\u06cc Node.js \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0628\u0646\u0627\u06cc\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0622\u067e \u0646\u06d2 \u0634\u0627\u06cc\u062f \u0627\u0633 \u0637\u0631\u062d \u06a9\u0627 \u062a\u062c\u0631\u0628\u06c1 \u06a9\u06cc\u0627 \u06c1\u0648\u06af\u0627\u06d4 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0645\u06cc\u0631\u06d2 \u06a9\u0645\u067e\u06cc\u0648\u0679\u0631 \u067e\u0631 \u0679\u06be\u06cc\u06a9 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u062c\u0628 \u0645\u06cc\u06ba \u0627\u0633\u06d2 \u0633\u0631\u0648\u0631 \u067e\u0631 \u062f\u06be\u06a9\u06cc\u0644\u062a\u0627 \u06c1\u0648\u06ba \u062a\u0648 \u06a9\u0686\u06be \u063a\u0644\u0637 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0645\u062e\u062a\u0644\u0641 \u0646\u0648\u0688 \u0648\u0631\u0698\u0646\u060c \u0644\u0627\u067e\u062a\u06c1 \u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a\u06cc \u0645\u062a\u063a\u06cc\u0631\u0627\u062a\u060c \u06cc\u0627 \u063a\u06cc\u0631 \u0645\u0645\u0627\u062b\u0644 \u0646\u0638\u0627\u0645 \u0627\u0646\u062d\u0635\u0627\u0631 \u06c1\u0648\u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1 \u06a9\u0633\u06cc \u0627\u06cc\u0633\u06cc \u0686\u06cc\u0632 \u06a9\u0648 \u0688\u06cc\u0628\u06af \u06a9\u0631\u0646\u06d2 \u0645\u06cc\u06ba \u0635\u0631\u0641 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u062f\u0631\u062d\u0642\u06cc\u0642\u062a \u06a9\u0648\u0688 \u06a9\u0627 \u0645\u0633\u0626\u0644\u06c1 \u0646\u06c1\u06cc\u06ba \u062a\u06be\u0627\u06d4<\/p>\n<p>\u0688\u0648\u06a9\u0631 \u0627\u0633\u06d2 \u062c\u0691 \u0633\u06d2 \u0679\u06be\u06cc\u06a9 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0688\u0648\u06a9\u0631 \u0622\u067e \u06a9\u0648 \u0635\u0631\u0641 \u06a9\u0648\u0688 \u06a9\u06cc \u062a\u0631\u0633\u06cc\u0644 \u0628\u0646\u062f \u06a9\u0631\u0646\u06d2 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u0646\u0648\u0688 \u0648\u0631\u0698\u0646\u060c \u0627\u0646\u062d\u0635\u0627\u0631\u060c \u0627\u0648\u0631 \u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646 \u0633\u0628\u06be\u06cc \u06a9\u0646\u0679\u06cc\u0646\u0631 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0645\u0646\u062a\u0642\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0644\u06cc\u067e \u0679\u0627\u067e\u0633\u060c CI \u0633\u0631\u0648\u0631\u0632\u060c \u0627\u0648\u0631 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 VMs \u0645\u06cc\u06ba \u06cc\u06a9\u0633\u0627\u06ba \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u0632\u06cc\u062f \u06a9\u0648\u0626\u06cc \u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a\u06cc \u062d\u06cc\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u0679\u06cc\u0648\u0679\u0648\u0631\u06cc\u0644 \u0645\u06cc\u06ba\u060c \u06c1\u0645 \u0622\u067e \u06a9\u0648 \u06c1\u0631 \u0642\u062f\u0645 \u067e\u0631 \u0686\u0644\u0627\u0626\u06cc\u06ba \u06af\u06d2\u060c \u0628\u0634\u0645\u0648\u0644 \u0645\u0642\u0627\u0645\u06cc \u062a\u0631\u0642\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 PostgreSQL \u06a9\u06d2 \u0633\u0627\u062a\u06be Docker Compose \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u06cc\u06a9 \u0645\u0644\u0679\u06cc \u0633\u0679\u06cc\u067e Dockerfile\u060c \u0627\u0648\u0631 \u06c1\u0631 \u0627\u0646\u0636\u0645\u0627\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be Docker Hub \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0646\u0626\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u0622\u06af\u06d2 \u0628\u0691\u06be\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 GitHub \u0627\u06cc\u06a9\u0634\u0646 \u0648\u0631\u06a9 \u0641\u0644\u0648\u06d4 <code>main<\/code>.<\/p>\n<p>\u0627\u0633 \u0679\u06cc\u0648\u0679\u0648\u0631\u06cc\u0644 \u06a9\u0627 \u0645\u06a9\u0645\u0644 \u06a9\u0648\u0688 GitHub \u067e\u0631 \u062f\u0633\u062a\u06cc\u0627\u0628 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-table-of-contents\">\u0627\u0646\u0688\u06cc\u06a9\u0633<\/h2>\n<ol>\n<li>\n<p>\u0634\u0631\u0637\u06cc\u06ba<\/p>\n<\/li>\n<li>\n<p>\u0646\u0645\u0648\u0646\u06c1 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a<\/p>\n<\/li>\n<li>\n<p>\u0688\u0627\u06a9\u0631 \u0641\u0627\u0626\u0644 \u0644\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>.dockerignore \u0641\u0627\u0626\u0644<\/p>\n<\/li>\n<li>\n<p>.gitignore \u0641\u0627\u0626\u0644<\/p>\n<\/li>\n<li>\n<p>\u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0646\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u062c\u0627\u0646\u0686\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0645\u0642\u0627\u0645\u06cc \u062a\u0631\u0642\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 \u0688\u0648\u06a9\u0631 \u06a9\u0645\u067e\u0648\u0632<\/p>\n<\/li>\n<li>\n<p>GitHub \u0627\u06cc\u06a9\u0634\u0646\u0632 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062e\u0648\u062f\u06a9\u0627\u0631 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u062a\u0635\u0648\u06cc\u0631 \u06a9\u06cc \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc<\/p>\n<\/li>\n<li>\n<p>\u062e\u062a\u0645<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"heading-prerequisites\">\u0634\u0631\u0637\u06cc\u06ba<\/h2>\n<ul>\n<li>\n<p>Node.js 18+<\/p>\n<\/li>\n<li>\n<p>Docker \u0688\u06cc\u0633\u06a9 \u0679\u0627\u067e\u060c docs.docker.com\/get-docker \u067e\u0631 \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062f\u0633\u062a\u06cc\u0627\u0628 \u06c1\u06d2\u06d4 \u0688\u0648\u06a9\u0631 \u0634\u0631\u0648\u0639 \u06c1\u0648\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0648\u0646\u0688\u0648\u0632 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0648 WSL 2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u06af\u06cc\u06d4 \u067e\u0627\u0648\u0631 \u0634\u06cc\u0644 \u06a9\u0648 \u0628\u0637\u0648\u0631 \u0627\u06cc\u0688\u0645\u0646\u0633\u0679\u0631\u06cc\u0679\u0631 \u06a9\u06be\u0648\u0644\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4 <code>wsl --install<\/code>. \u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c Docker \u0688\u06cc\u0633\u06a9 \u0679\u0627\u067e \u0628\u063a\u06cc\u0631 \u06a9\u0633\u06cc \u0645\u0633\u0626\u0644\u06d2 \u06a9\u06d2 \u0627\u0646\u0633\u0679\u0627\u0644 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<\/li>\n<li>\n<p>GitHub \u0627\u06a9\u0627\u0624\u0646\u0679<\/p>\n<\/li>\n<li>\n<p>Docker Hub \u0627\u06a9\u0627\u0624\u0646\u0679 (hub.docker.com \u067e\u0631 \u0645\u0641\u062a)<\/p>\n<\/li>\n<li>\n<p>Express.js \u06a9\u0627 \u06a9\u0686\u06be \u062a\u062c\u0631\u0628\u06c1 \u0645\u062f\u062f\u06af\u0627\u0631 \u062b\u0627\u0628\u062a \u06c1\u0648\u06af\u0627 \u0644\u06cc\u06a9\u0646 \u0627\u0633 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"heading-the-sample-application\">\u0646\u0645\u0648\u0646\u06c1 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a<\/h2>\n<p>\u06c1\u0645 \u0627\u06cc\u06a9\u0633\u067e\u0631\u06cc\u0633 \u0627\u0648\u0631 \u067e\u0648\u0633\u0679\u06af\u0631\u06cc \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u06cc\u06a9 \u0679\u0627\u0633\u06a9 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679 API \u0628\u0646\u0627 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0630\u06c1\u0646 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u06cc\u06ba \u06a9\u06c1 \u0627\u06cc\u067e \u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u062f\u06a9\u06be\u0627\u0646\u06d2 \u06a9\u0627 \u0627\u06cc\u06a9 \u0637\u0631\u06cc\u0642\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u0646\u06d2 \u06cc\u06c1\u0627\u06ba \u062c\u0648 Dockerfile \u0627\u0648\u0631 \u067e\u0627\u0626\u067e \u0644\u0627\u0626\u0646 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc \u06c1\u06d2 \u0648\u06c1 \u062a\u0645\u0627\u0645 Node.js \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679\u0633 \u0645\u06cc\u06ba \u0627\u0633\u06cc \u0637\u0631\u062d \u06a9\u0627\u0645 \u06a9\u0631\u06d2 \u06af\u06cc\u06d4<\/p>\n<p>\u0627\u06cc\u06a9 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0628\u0646\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">mkdir nodejs-docker-cicd && cd nodejs-docker-cicd\nnpm init -y\nnpm install express pg dotenv\nnpm install --save-dev nodemon\n<\/code><\/pre>\n<p>\u0628\u0646\u0627\u0646\u0627 <code>src\/index.js<\/code>:<\/p>\n<pre><code class=\"language-javascript\">const express = require('express');\nconst { Pool } = require('pg');\nrequire('dotenv').config();\n\nconst app = express();\napp.use(express.json());\n\nconst pool = new Pool({\n  host: process.env.DB_HOST,\n  port: process.env.DB_PORT,\n  database: process.env.DB_NAME,\n  user: process.env.DB_USER,\n  password: process.env.DB_PASSWORD,\n});\n\n\/\/ Create table on startup\npool.query(`\n  CREATE TABLE IF NOT EXISTS tasks (\n    id SERIAL PRIMARY KEY,\n    title VARCHAR(255) NOT NULL,\n    completed BOOLEAN DEFAULT FALSE,\n    created_at TIMESTAMP DEFAULT NOW()\n  )\n`).catch(console.error);\n\n\/\/ Health check \u2014 required for Docker HEALTHCHECK and load balancers\napp.get('\/health', (req, res) => {\n  res.json({ status: 'ok', timestamp: new Date().toISOString() });\n});\n\napp.get('\/tasks', async (req, res) => {\n  try {\n    const result = await pool.query('SELECT * FROM tasks ORDER BY created_at DESC');\n    res.json(result.rows);\n  } catch (err) {\n    res.status(500).json({ error: err.message });\n  }\n});\n\napp.post('\/tasks', async (req, res) => {\n  const { title } = req.body;\n  if (!title) return res.status(400).json({ error: 'Title is required' });\n  try {\n    const result = await pool.query(\n      'INSERT INTO tasks (title) VALUES ($1) RETURNING *',\n      How to Containerize a Node.js Application with Docker and Deploy with GitHub Actions\n    );\n    res.status(201).json(result.rows[0]);\n  } catch (err) {\n    res.status(500).json({ error: err.message });\n  }\n});\n\napp.patch('\/tasks\/:id', async (req, res) => {\n  const { id } = req.params;\n  const { completed } = req.body;\n  try {\n    const result = await pool.query(\n      'UPDATE tasks SET completed = $1 WHERE id = $2 RETURNING *',\n      [completed, id]\n    );\n    if (result.rows.length === 0) return res.status(404).json({ error: 'Task not found' });\n    res.json(result.rows[0]);\n  } catch (err) {\n    res.status(500).json({ error: err.message });\n  }\n});\n\nconst PORT = process.env.PORT || 3000;\napp.listen(PORT, () => console.log(`Server running on port ${PORT}`));\n<\/code><\/pre>\n<p>\u06a9\u06be\u0644\u0627 <code>package.json<\/code> \u0627\u067e \u0688\u06cc\u0679 \u0627\u0648\u0631 <code>\"scripts\"<\/code> \u062c\u0632 \u0648\u0642\u062a\u06cc \u0645\u0644\u0627\u0632\u0645\u062a:<\/p>\n<pre><code class=\"language-json\">\"scripts\": {\n  \"start\": \"node src\/index.js\",\n  \"dev\": \"nodemon src\/index.js\"\n}\n<\/code><\/pre>\n<p><code>npm start<\/code>    \u0627\u067e\u0646\u06cc \u0627\u06cc\u067e \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a Node.js \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4 <code>npm run dev<\/code> \u0686\u0648\u0646\u06a9\u06c1 \u0645\u06cc\u06ba \u0646\u0648\u0688\u06cc\u0645\u0648\u0646 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba\u060c \u062c\u0628 \u0645\u06cc\u06ba \u0641\u0627\u0626\u0644 \u0645\u06cc\u06ba \u062a\u0631\u0645\u06cc\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba \u062a\u0648 \u0633\u0631\u0648\u0631 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639 \u06c1\u0648\u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0688\u0648\u06a9\u0631 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0686\u0644\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 <code>.env<\/code> \u0641\u0627\u0626\u0644:<\/p>\n<pre><code class=\"language-plaintext\">DB_HOST=localhost\nDB_PORT=5432\nDB_NAME=tasksdb\nDB_USER=postgres\nDB_PASSWORD=yourpassword\nPORT=3000\n<\/code><\/pre>\n<p>\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06cc \u062a\u0645\u0627\u0645 \u0627\u0633\u0646\u0627\u062f \u06c1\u0627\u0631\u0688 \u06a9\u0648\u0688 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba \u0628\u0644\u06a9\u06c1 \u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a\u06cc \u0645\u062a\u063a\u06cc\u0631\u0627\u062a \u0633\u06d2 \u0622\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0645\u062a\u063a\u06cc\u0631\u0627\u062a \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0622\u067e \u06a9\u06d2 \u0645\u0642\u0627\u0645\u06cc \u06cc\u0627 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06d2 \u062e\u0644\u0627\u0641 \u0686\u0644\u06d2 \u06af\u06cc\u06d4 \u06a9\u0633\u06cc \u06a9\u0648\u0688 \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06a9\u06c1 <code>\/health<\/code> \u0627\u062e\u062a\u062a\u0627\u0645\u06cc \u0646\u0642\u0637\u06c1 \u0648\u06c1\u06cc \u06c1\u06d2 \u062c\u0648 \u0688\u0648\u06a9\u0631 \u0627\u0633 \u0628\u0627\u062a \u06a9\u06cc \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u0646\u06af \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u06cc \u0627\u06cc\u067e \u062f\u0631\u062d\u0642\u06cc\u0642\u062a \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0631 \u0631\u06c1\u06cc \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-writing-the-dockerfile\">\u0688\u0627\u06a9\u0631 \u0641\u0627\u0626\u0644 \u0644\u06a9\u06be\u06cc\u06ba\u06d4<\/h2>\n<p>Dockerfile \u06a9\u0648 \u0686\u06be\u0648\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u062f\u0648 \u0627\u0635\u0637\u0644\u0627\u062d\u0627\u062a \u06c1\u06cc\u06ba \u062c\u0648 \u0622\u067e \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u0631\u06c1\u06cc\u06ba \u06af\u06d2: \u0646\u06c1\u06cc\u06ba\u06d4 <strong>\u0648\u06cc\u0688\u06cc\u0648<\/strong> \u0622\u067e \u06a9\u06cc \u0627\u06cc\u067e \u06a9\u0627 \u0627\u06cc\u06a9 \u0646\u0627\u0642\u0627\u0628\u0644 \u062a\u063a\u06cc\u0631\u060c \u067e\u06cc\u06a9 \u0634\u062f\u06c1 \u0648\u0631\u0698\u0646 \u062c\u0633 \u0645\u06cc\u06ba \u0646\u0648\u0688 \u0631\u0646 \u0679\u0627\u0626\u0645\u060c \u06a9\u0648\u0688\u060c \u0627\u0648\u0631 \u0627\u0646\u062d\u0635\u0627\u0631 \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u0646\u0645\u0648\u0646\u06d2 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06d2\u06d4 \u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <strong>\u06a9\u0646\u0679\u06cc\u0646\u0631<\/strong> \u0627\u0633 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06cc \u0686\u0644\u062a\u06cc \u06c1\u0648\u0626\u06cc \u0645\u062b\u0627\u0644\u06d4 \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631\u060c \u0628\u06c1\u062a \u0633\u06d2 \u06a9\u0646\u0679\u06cc\u0646\u0631\u0632\u060c \u062a\u0645\u0627\u0645 \u0645\u0634\u06cc\u0646\u06cc\u06ba\u06d4<\/p>\n<p>\u0688\u0627\u06a9\u0631 \u0641\u0627\u0626\u0644 \u062c\u0648 \u06c1\u0645 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u06af\u06d2 \u0648\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dockerfile\"># \u2500\u2500 Stage 1: Install dependencies \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nFROM node:18-alpine AS builder\n\nWORKDIR \/app\n\n# Copy package files first \u2014 Docker caches this layer separately.\n# If you only change src code (not package.json), Docker skips npm ci on rebuild.\nCOPY package*.json .\/\nRUN npm ci\n\nCOPY . .\n\n\n# \u2500\u2500 Stage 2: Production image \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nFROM node:18-alpine AS production\n\n# Create a non-root user \u2014 running as root inside a container is a security risk\nRUN addgroup -g 1001 -S nodejs && \\\n    adduser -S nodeuser -u 1001\n\nWORKDIR \/app\n\nCOPY package*.json .\/\nRUN npm ci --only=production\n\n# Copy only the source code from the builder stage (not node_modules or dev files)\nCOPY --from=builder \/app\/src .\/src\n\nRUN chown -R nodeuser:nodejs \/app\nUSER nodeuser\n\nEXPOSE 3000\n\n# Docker will ping \/health every 30s. If it fails 3 times, the container is marked unhealthy.\nHEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\\n  CMD wget --no-verbose --tries=1 --spider http:\/\/localhost:3000\/health || exit 1\n\nCMD [\"node\", \"src\/index.js\"]\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u06a9\u062b\u06cc\u0631 \u0645\u0631\u062d\u0644\u06c1 \u062a\u0639\u0645\u06cc\u0631 \u06c1\u06d2\u06d4 \u067e\u06c1\u0644\u0627 \u0642\u062f\u0645 (<code>builder<\/code>) \u062a\u0631\u0642\u06cc \u06a9\u06d2 \u0627\u0646\u062d\u0635\u0627\u0631 \u0633\u0645\u06cc\u062a \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u0627\u0646\u0633\u0679\u0627\u0644 \u06a9\u0631\u06d2 \u06af\u0627\u06d4 \u062f\u0648\u0633\u0631\u0627 \u0645\u0631\u062d\u0644\u06c1 (<code>production<\/code>) \u062a\u0627\u0632\u06c1 \u0634\u0631\u0648\u0639 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0635\u0631\u0641 \u0648\u06c1\u06cc \u06a9\u0627\u067e\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u06cc\u067e \u06a9\u0648 \u0686\u0644\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062f\u0631\u06a9\u0627\u0631 \u06c1\u06d2\u06d4 \u0646\u0648\u0688\u06cc\u0645\u0648\u0646\u060c \u0679\u06cc\u0633\u0679\u0646\u06af \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9\u060c \u0627\u0648\u0631 \u062f\u06cc\u06af\u0631 \u0635\u0631\u0641 \u062a\u0631\u0642\u06cc \u067e\u0630\u06cc\u0631 \u0627\u0634\u06cc\u0627\u0621 \u062d\u062a\u0645\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0633\u0627\u0626\u0632 \u06a9\u0627 \u0641\u0631\u0642 \u0648\u0627\u0642\u0639\u06cc \u0642\u0627\u0628\u0644 \u062f\u06cc\u062f \u06c1\u06d2\u06d4 \u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>node:18<\/code> Debian \u062a\u0635\u0648\u06cc\u0631 950MB \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06d2\u06d4 \u067e\u0631 \u0633\u0648\u0626\u0686 \u06a9\u0631\u06cc\u06ba\u06d4 <code>node:18-alpine<\/code> \u0627\u06af\u0631 \u0622\u067e \u062a\u0631\u0642\u06cc\u0627\u062a\u06cc \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u0648 \u062e\u062a\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648\u060c \u062d\u062a\u0645\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0627\u0633 \u06a9\u06cc \u0628\u062c\u0627\u0626\u06d2 150-200MB \u06a9\u06d2 \u0644\u06af \u0628\u06be\u06af \u06c1\u0648\u06af\u06cc\u06d4 \u0686\u06be\u0648\u0679\u06cc \u062a\u0635\u0648\u06cc\u0631\u0648\u06ba \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u062a\u06cc\u0632 \u062f\u06be\u06a9\u06d2 \u0627\u0648\u0631 \u062a\u06cc\u0632\u06cc \u0633\u06d2 \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc\u06d4<\/p>\n<p><code>npm ci<\/code>    \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 <code>npm install<\/code> \u06cc\u06c1 CI\/CD \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0627\u0646 \u0628\u0648\u062c\u06be \u06a9\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u06c1\u06d2\u06d4 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u0635\u062d\u06cc\u062d \u0648\u0631\u0698\u0646 \u067e\u0691\u06be\u06cc\u06ba: <code>package-lock.json<\/code> \u06cc\u06c1 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627 \u0627\u06af\u0631 \u0644\u0627\u06a9 \u0641\u0627\u0626\u0644\u06cc\u06ba \u0645\u0645\u0627\u062b\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4 <code>package.json<\/code>. \u06c1\u0631 \u0645\u0634\u06cc\u0646 \u067e\u0631 \u06c1\u0631 \u062a\u0639\u0645\u06cc\u0631 \u0628\u0627\u0644\u06a9\u0644 \u0648\u06c1\u06cc \u0648\u0631\u0698\u0646 \u0627\u0646\u0633\u0679\u0627\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u06cc\u06c1 \u062d\u06cc\u0631\u062a \u06a9\u06cc \u0628\u0627\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u0627\u0646\u062d\u0635\u0627\u0631 \u0631\u0627\u062a\u0648\u06ba \u0631\u0627\u062a \u062e\u0627\u0645\u0648\u0634\u06cc \u0633\u06d2 \u0627\u067e \u0688\u06cc\u0679 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u06d4<\/p>\n<p>\u06a9\u06c1 <code>nodeuser<\/code> \u0627\u06a9\u0627\u0624\u0646\u0679 \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06a9\u0646\u0679\u06cc\u0646\u0631 \u0628\u0637\u0648\u0631 \u0688\u06cc\u0641\u0627\u0644\u0679 \u0631\u0648\u0679 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u062c\u0628 \u062a\u06a9 \u06a9\u0686\u06be \u063a\u0644\u0637 \u0646\u06c1 \u06c1\u0648 \u062a\u0628 \u062a\u06a9 \u06cc\u06c1 \u0679\u06be\u06cc\u06a9 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u063a\u06cc\u0631 \u062c\u0691 \u0635\u0627\u0631\u0641 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u06a9\u0646\u0679\u06cc\u0646\u0631 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u060c \u062d\u0645\u0644\u06c1 \u0622\u0648\u0631 \u062c\u0648 \u0686\u0627\u06c1\u06d2 \u0648\u06c1 \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0633\u06a9\u062a\u0627\u06d4<\/p>\n<h2 id=\"heading-the-dockerignore-file\">\u06a9\u06c1 <code>.dockerignore<\/code> \u0641\u0627\u0626\u0644<\/h2>\n<p>\u0628\u0646\u0627\u0646\u0627 <code>.dockerignore<\/code> \u062a\u0639\u0645\u06cc\u0631 \u0633\u06d2 \u067e\u06c1\u0644\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">node_modules\nnpm-debug.log\n.env\n.git\n.gitignore\nREADME.md\nDockerfile\n.dockerignore\n<\/code><\/pre>\n<p>\u06a9\u06c1 <code>node_modules<\/code> \u0627\u062e\u0631\u0627\u062c \u0627\u0646\u062a\u06c1\u0627\u0626\u06cc \u0627\u06c1\u0645\u06cc\u062a \u06a9\u0627 \u062d\u0627\u0645\u0644 \u06c1\u06d2\u06d4 \u0645\u0642\u0627\u0645\u06cc \u0645\u0627\u0688\u06cc\u0648\u0644\u0632 \u0622\u067e \u06a9\u06d2 \u0622\u067e\u0631\u06cc\u0679\u0646\u06af \u0633\u0633\u0679\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0631\u062a\u0628 \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0645\u06cc\u06a9\u0648\u0633 \u06cc\u0627 \u0648\u0646\u0688\u0648\u0632 \u0628\u0627\u0626\u0646\u0631\u06cc\u0632 \u0644\u06cc\u0646\u06a9\u0633 \u06a9\u0646\u0679\u06cc\u0646\u0631\u0632 \u0645\u06cc\u06ba \u06a9\u0627\u0645 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4 \u0627\u0633 \u06a9\u0648 \u0686\u06be\u0648\u0691\u0646\u06d2 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0688\u0648\u06a9\u0631 \u062a\u0639\u0645\u06cc\u0631 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u062f\u0631\u0633\u062a \u067e\u0644\u06cc\u0679 \u0641\u0627\u0631\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0631\u062a\u0628 \u06a9\u0631\u062f\u06c1 \u0646\u0626\u06d2 \u0645\u0627\u0688\u06cc\u0648\u0644\u0632 \u0627\u0646\u0633\u0679\u0627\u0644 \u06a9\u0631\u06d2 \u06af\u0627\u06d4 \u0627\u0646 \u0627\u062e\u0631\u0627\u062c \u06a9\u06d2 \u0628\u063a\u06cc\u0631\u060c \u0622\u067e \u062e\u0631\u0627\u0628 \u0634\u062f\u06c1 \u0628\u0627\u0626\u0646\u0631\u06cc\u0632 \u06a9\u0648 \u0627\u067e\u0646\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc\u06ba \u06a9\u0627\u067e\u06cc \u06a9\u0631\u0646\u06d2 \u06cc\u0627 \u062a\u0639\u0645\u06cc\u0631\u0627\u062a\u06cc \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u0645\u06cc\u06ba \u0633\u06cc\u06a9\u0691\u0648\u06ba \u0645\u06cc\u06af\u0627 \u0628\u0627\u0626\u0679\u0633 \u0627\u067e \u0644\u0648\u0688 \u06a9\u0631\u0646\u06d2 \u0645\u06cc\u06ba \u0648\u0642\u062a \u0636\u0627\u0626\u0639 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u0633\u06d2 \u06a9\u0628\u06be\u06cc \u0646\u06c1 \u0688\u0627\u0644\u06cc\u06ba\u06d4 <code>.env<\/code> \u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc\u06ba\u06d4 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u062d\u0633\u0627\u0633 \u0622\u0626\u0679\u0645\u0632 \u062c\u06cc\u0633\u06d2 \u067e\u0627\u0633 \u0648\u0631\u0688\u060c API \u06a9\u06cc\u0632 \u0648\u063a\u06cc\u0631\u06c1 \u06a9\u0648 \u0631\u0646 \u0679\u0627\u0626\u0645 \u06a9\u06d2 \u0648\u0642\u062a \u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a\u06cc \u0645\u062a\u063a\u06cc\u0631\u0627\u062a \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u062f\u0627\u062e\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0646\u06c1 \u06a9\u06c1 \u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-the-gitignore-file\">\u06a9\u06c1 <code>.gitignore<\/code> \u0641\u0627\u0626\u0644<\/h2>\n<p>\u0622\u067e \u06a9\u06d2 \u067e\u06c1\u0644\u06d2 \u0639\u06c1\u062f \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u06cc\u06a9 \u0627\u0648\u0631 \u0686\u06cc\u0632: <code>.gitignore<\/code>. \u0622\u067e \u0646\u06c1\u06cc\u06ba \u0686\u0627\u06c1\u062a\u06d2 <code>node_modules<\/code> \u06cc\u0627 <code>.env<\/code> \u0679\u0631\u06cc\u06a9 \u06a9\u06cc\u0627 \u06af\u06cc\u0627:<\/p>\n<pre><code class=\"language-plaintext\">node_modules\/\n.env\n.env.local\nnpm-debug.log*\nlogs\/\n.DS_Store\nThumbs.db\n.vscode\/\n.idea\/\ndist\/\nbuild\/\n<\/code><\/pre>\n<h2 id=\"heading-build-and-test-the-image-locally\">\u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0646\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u062c\u0627\u0646\u0686\u06cc\u06ba\u06d4<\/h2>\n<p>\u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0688\u0648\u06a9\u0631 \u0688\u06cc\u0633\u06a9 \u0679\u0627\u067e \u06a9\u06be\u0648\u0644\u06cc\u06ba \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0644\u0645\u062d\u06d2 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0631 \u06a9\u0631\u06cc\u06ba\u06d4 \u0648\u0646\u0688\u0648\u0632 \u0645\u06cc\u06ba\u060c \u0627\u0646\u062c\u0646 \u06a9\u06d2 \u0634\u0631\u0648\u0639 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0679\u0627\u0633\u06a9 \u0628\u0627\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u062d\u0631\u06a9\u062a \u067e\u0630\u06cc\u0631 \u0648\u06c1\u06cc\u0644 \u06a9\u0627 \u0622\u0626\u06cc\u06a9\u0646 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u0686\u0644\u062a\u06d2 \u06c1\u06cc\u06ba\u060c Docker \u06a9\u0645\u0627\u0646\u0688\u0632 \u06a9\u0648 \u0686\u0644\u0627\u0646\u0627 \u0627\u06cc\u06a9 \u0627\u0686\u06be\u0627 \u062e\u06cc\u0627\u0644 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u0646\u062c\u0646 \u06a9\u06d2 \u0686\u0644\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0688\u0648\u06a9\u0631 \u0686\u0644\u0627\u0646\u06d2 \u06a9\u06cc \u06a9\u0648\u0634\u0634 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648\u060c \u062f\u0631\u062c \u0630\u06cc\u0644 \u06c1\u0648\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">ERROR: Error response from daemon: Docker Desktop is unable to start\n<\/code><\/pre>\n<p>\u0627\u0633 \u0635\u0648\u0631\u062a \u0645\u06cc\u06ba\u060c Docker Desktop \u06a9\u0648 \u0686\u06be\u0648\u0691 \u062f\u06cc\u06ba\u06d4 \u0627\u06cc\u0688\u0645\u0646\u0633\u0679\u0631\u06cc\u0679\u0631 \u06a9\u06cc \u0645\u0631\u0627\u0639\u0627\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u067e\u0627\u0648\u0631 \u0634\u06cc\u0644 \u06a9\u06be\u0648\u0644\u06cc\u06ba \u0627\u0648\u0631 \u0686\u0644\u0627\u0626\u06cc\u06ba: <code>wsl --update<\/code>\u0627\u0648\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4 \u067e\u06be\u0631 \u06a9\u0646\u0679\u0631\u0648\u0644 \u067e\u06cc\u0646\u0644 \u2192 \u067e\u0631\u0648\u06af\u0631\u0627\u0645\u0632 \u2192 \u0648\u0646\u0688\u0648\u0632 \u06a9\u06cc \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u06a9\u0648 \u0622\u0646 \u06cc\u0627 \u0622\u0641 \u067e\u0631 \u062c\u0627\u0626\u06cc\u06ba\u06d4 \u0622\u067e \u06a9\u0648 Hyper-V \u0627\u0648\u0631 \u0648\u0631\u0686\u0648\u0626\u0644 \u0645\u0634\u06cc\u0646 \u067e\u0644\u06cc\u0679 \u0641\u0627\u0631\u0645 \u062f\u0648\u0646\u0648\u06ba \u06a9\u0648 \u0686\u06cc\u06a9 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c Docker \u0688\u06cc\u0633\u06a9 \u0679\u0627\u067e \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0628\u06be\u06cc \u0622\u06af\u0627\u06c1 \u06c1\u0648\u0646\u0627 \u0627\u0686\u06be\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-plaintext\">docker : The term 'docker' is not recognized as the name of a cmdlet, function,\nscript file, or operable program.\n<\/code><\/pre>\n<p>\u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0688\u0648\u06a9\u0631 \u0688\u06cc\u0633\u06a9 \u0679\u0627\u067e \u0646\u06c1\u06cc\u06ba \u0686\u0644 \u0631\u06c1\u0627 \u06c1\u06d2 \u06cc\u0627 \u0627\u0646\u0633\u0679\u0627\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0627\u0633\u06d2 \u0627\u0633\u0679\u0627\u0631\u0679 \u0645\u06cc\u0646\u0648 \u0633\u06d2 \u06a9\u06be\u0648\u0644\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0646\u062a\u0638\u0627\u0631 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u062a\u0639\u0645\u06cc\u0631 \u06a9\u0648 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">docker build -t nodejs-docker-cicd:latest .\n<\/code><\/pre>\n<p>\u0627\u0633 \u0645\u06cc\u06ba \u0627\u0628\u062a\u062f\u0627\u0626\u06cc \u0637\u0648\u0631 \u067e\u0631 30 \u0633\u06cc\u06a9\u0646\u0688 \u0644\u06af\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0688\u0648\u06a9\u0631 \u06a9\u0648 \u067e\u0644 \u06a9\u0631\u0646\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 <code>node:18-alpine<\/code> \u0627\u0646\u0679\u0631\u0646\u06cc\u0679 \u067e\u0631\u06d4 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u06a9\u06cc\u0634 \u06c1\u0648 \u062c\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0628\u0639\u062f \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631\u0627\u062a \u0628\u06c1\u062a \u062a\u06cc\u0632 \u06c1\u0648\u06ba \u06af\u06cc\u06d4 \u062f\u0648\u0646\u0648\u06ba \u0645\u0631\u0627\u062d\u0644 \u0627\u0633 \u0637\u0631\u062d \u0633\u06a9\u0631\u0648\u0644 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-plaintext\">[+] Building 33.1s (17\/17) FINISHED\n => [builder 1\/5] FROM docker.io\/library\/node:18-alpine       20.9s\n => [builder 4\/5] RUN npm ci                                   3.5s\n => [production 5\/7] RUN npm ci --only=production              3.2s\n => [production 7\/7] RUN chown -R nodeuser:nodejs \/app         3.2s\n => exporting to image                                         1.5s\n => => naming to docker.io\/library\/nodejs-docker-cicd:latest     0.0s\n<\/code><\/pre>\n<p>\u062c\u0628 \u0622\u067e \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba <code>(17\/17) FINISHED<\/code> \u062a\u0635\u0648\u06cc\u0631 \u0628\u0646\u0627\u0626\u06cc \u06af\u0626\u06cc \u06c1\u06d2\u06d4 \u0628\u0631\u0627\u06c1 \u06a9\u0631\u0645 \u0633\u0627\u0626\u0632 \u0686\u06cc\u06a9 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-bash\">docker images nodejs-docker-cicd\n<\/code><\/pre>\n<pre><code class=\"language-plaintext\">IMAGE                     ID             DISK USAGE   CONTENT SIZE\nnodejs-docker-cicd:latest   c9eed311d999        198MB         47.5MB\n<\/code><\/pre>\n<p><strong>\u0645\u0648\u0627\u062f \u06a9\u0627 \u0633\u0627\u0626\u0632<\/strong> (47.5MB) \u0648\u06c1 \u06a9\u0645\u067e\u0631\u06cc\u0633\u0688 \u0633\u0627\u0626\u0632 \u06c1\u06d2 \u062c\u0633\u06d2 Docker Hub \u0645\u06cc\u06ba \u062f\u06be\u06a9\u06cc\u0644 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <strong>\u0688\u0633\u06a9 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644<\/strong> (198MB) \u0648\u06c1 \u0631\u0642\u0645 \u06c1\u06d2 \u062c\u0648 \u0688\u0633\u06a9 \u067e\u0631 \u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0644\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u0633 \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u0631\u06cc\u06ba\u06d4 <code>node:18<\/code> 950+ MB \u0688\u06cc\u0628\u06cc\u0646 \u062a\u0635\u0648\u06cc\u0631 \u067e\u0631 \u0627\u06cc\u06a9 \u0646\u0638\u0631 \u06cc\u06c1 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2 \u06a9\u06c1 \u0627\u0644\u067e\u0627\u0626\u0646 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0627\u0648\u0631 \u0645\u0644\u0679\u06cc \u0633\u0679\u06cc\u067e \u0627\u067e\u0631\u0648\u0686 \u06a9\u06cc\u0648\u06ba \u0627\u06c1\u0645 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631\u0627\u062a \u0645\u06cc\u06ba\u060c \u0688\u0648\u06a9\u0631 \u06a9\u06cc\u0634\u0688 \u067e\u0631\u062a\u0648\u06ba \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0686\u06cc\u0632 \u06a9\u0648 \u0686\u06be\u0648\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u0633\u0648\u0631\u0633 \u0641\u0627\u0626\u0644\u0648\u06ba \u0645\u06cc\u06ba \u062a\u0631\u0645\u06cc\u0645 \u06a9\u0631\u06cc\u06ba\u06d4 <code>package.json<\/code> \u0627\u0648\u0631 <code>npm ci<\/code> \u0642\u062f\u0645 \u06a9\u0648 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0686\u06be\u0648\u0691 \u062f\u06cc\u06ba\u06d4 33 \u0633\u06cc\u06a9\u0646\u0688 \u0645\u06cc\u06ba \u067e\u06c1\u0644\u06cc \u062a\u0639\u0645\u06cc\u0631 3 \u0633\u06cc\u06a9\u0646\u0688 \u0628\u0646 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-docker-compose-for-local-development\">\u0645\u0642\u0627\u0645\u06cc \u062a\u0631\u0642\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 \u0688\u0648\u06a9\u0631 \u06a9\u0645\u067e\u0648\u0632<\/h2>\n<p>\u0622\u067e \u06a9\u06cc \u0627\u06cc\u067e \u06a9\u0648 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 PostgreSQL \u06a9\u0648 \u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0646\u06d2 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0630\u062e\u06cc\u0631\u06c1 \u06a9\u0648 \u06a9\u0644\u0648\u0646 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0688\u0648\u06cc\u0644\u067e\u0631 \u06a9\u0648 \u0628\u06be\u06cc \u0627\u06cc\u0633\u0627 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u0688\u0648\u06a9\u0631 \u06a9\u0645\u067e\u0648\u0632 \u0622\u067e \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633 \u06a9\u0627 \u062e\u06cc\u0627\u0644 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0641\u0627\u0626\u0644 \u062f\u0648\u0646\u0648\u06ba \u062e\u062f\u0645\u0627\u062a \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0646\u06c1\u06cc\u06ba \u0627\u06cc\u06a9 \u06a9\u0645\u0627\u0646\u0688 \u0633\u06d2 \u0634\u0631\u0648\u0639 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0628\u0646\u0627\u0646\u0627 <code>docker-compose.yml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">services:\n  app:\n    build:\n      context: .\n      target: production\n    ports:\n      - '3000:3000'\n    environment:\n      DB_HOST: postgres\n      DB_PORT: 5432\n      DB_NAME: tasksdb\n      DB_USER: postgres\n      DB_PASSWORD: postgres\n      PORT: 3000\n    depends_on:\n      postgres:\n        condition: service_healthy\n    restart: unless-stopped\n\n  postgres:\n    image: postgres:15-alpine\n    environment:\n      POSTGRES_DB: tasksdb\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: postgres\n    ports:\n      - '5432:5432'\n    volumes:\n      - postgres_data:\/var\/lib\/postgresql\/data\n    healthcheck:\n      test: ['CMD-SHELL', 'pg_isready -U postgres']\n      interval: 5s\n      timeout: 5s\n      retries: 5\n\nvolumes:\n  postgres_data:\n<\/code><\/pre>\n<p>\u0686\u0646\u062f \u0628\u0627\u062a\u06cc\u06ba \u0642\u0627\u0628\u0644 \u062a\u0648\u062c\u06c1 \u06c1\u06cc\u06ba\u06d4 <code>DB_HOST<\/code> \u067e\u0631 \u0645\u0642\u0631\u0631 \u06c1\u06d2 <code>postgres<\/code>. \u062e\u062f\u0645\u062a \u06a9\u0627 \u0646\u0627\u0645 \u0646\u06c1\u06cc\u06ba\u06d4 <code>localhost<\/code>. \u0627\u06cc\u06a9 \u06c1\u06cc \u0688\u0648\u06a9\u0631 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u067e\u0631 \u06a9\u0646\u0679\u06cc\u0646\u0631\u0632 \u0633\u0631\u0648\u0633 \u06a9\u06d2 \u0646\u0627\u0645\u0648\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u062f\u0648\u0633\u0631\u06d2 \u0633\u06d2 \u062c\u0691\u06d2 \u06c1\u0648\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0688\u0627\u0644 <code>localhost<\/code> \u0627\u06cc\u067e \u062e\u0648\u062f \u0633\u06d2 \u062c\u0691\u0646\u06d2 \u06a9\u06cc \u06a9\u0648\u0634\u0634 \u06a9\u0631\u06d2 \u06af\u06cc\u06d4<\/p>\n<p><code>depends_on<\/code>    \u06a9\u06d2 \u0633\u0627\u062a\u06be <code>condition: service_healthy<\/code> \u067e\u0648\u0633\u0679\u06af\u0631\u06cc\u0633 \u0627\u06cc\u067e \u06a9\u0648 \u06c1\u0648\u0644\u0688 \u067e\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u06cc\u06c1 \u0635\u062d\u062a \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0648 \u062d\u0642\u06cc\u0642\u062a \u0645\u06cc\u06ba \u067e\u0627\u0633 \u0646\u06c1 \u06a9\u0631 \u0644\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u0633\u06d2 \u0686\u06be\u0648\u0691 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0627\u06cc\u067e \u0634\u0631\u0648\u0639 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u06cc\u060c \u0627\u06cc\u0633\u06d2 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0633\u06d2 \u062c\u0691\u0646\u06d2 \u06a9\u06cc \u06a9\u0648\u0634\u0634 \u06a9\u0631\u06cc\u06ba \u062c\u0648 \u0627\u0628\u06be\u06cc \u062a\u06cc\u0627\u0631 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06a9\u0631\u06cc\u0634 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4 \u0627\u0633\u0679\u06cc\u0679\u0633 \u0686\u06cc\u06a9 \u067e\u0646\u06af <code>pg_isready<\/code> \u06c1\u0631 5 \u0633\u06cc\u06a9\u0646\u0688 \u0645\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u06a9\u0648 \u0633\u0628\u0632 \u062c\u0648\u0627\u0628 \u0645\u0644\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0627\u06cc\u067e \u06a9\u0646\u0679\u06cc\u0646\u0631 \u0634\u0631\u0648\u0639 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p>\u0646\u0627\u0645 \u06a9\u0627 \u062d\u062c\u0645 <code>postgres_data<\/code> \u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639 \u06c1\u0648\u0646\u06d2 \u067e\u0631 \u0688\u06cc\u0679\u0627 \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u0686\u0644\u0627\u0626\u06cc\u06ba <code>docker compose down<\/code> \u0622\u067e \u06a9\u0627 \u0688\u06cc\u0679\u0627 \u0627\u06af\u0644\u06cc \u0628\u0627\u0631 \u0628\u06be\u06cc \u0645\u0648\u062c\u0648\u062f \u0631\u06c1\u06d2 \u06af\u0627\u06d4 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba <code>--volumes<\/code> \u0627\u0633\u06d2 \u0635\u0627\u0641 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u06d4<\/p>\n<p>\u062f\u0648\u0646\u0648\u06ba \u062e\u062f\u0645\u0627\u062a \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-bash\">docker compose up --build\n<\/code><\/pre>\n<p>\u0622\u067e \u062f\u06cc\u06a9\u06be\u06cc\u06ba \u06af\u06d2 \u06a9\u06c1 PostgreSQL \u0634\u0631\u0648\u0639 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u0627\u0648\u0631 \u067e\u06be\u0631 \u0627\u06cc\u067e \u0644\u0627\u0646\u0686 \u06c1\u0648\u0626\u06cc\u06d4 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062f\u06cc\u06a9\u06be \u0644\u06cc\u06ba\u06d4 <code>Server running on port 3000<\/code> \u0644\u0627\u06af \u0633\u06d2\u060c \u0627\u0633\u0679\u06cc\u06a9 \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0679\u06cc\u0633\u0679 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062f\u0648\u0633\u0631\u0627 \u0679\u0631\u0645\u06cc\u0646\u0644 \u06a9\u06be\u0648\u0644\u06cc\u06ba\u06d4 \u062a\u062e\u0644\u06cc\u0642 \u0644\u0627\u06af \u06a9\u0648 \u067e\u06c1\u0644\u06d2 \u0679\u0631\u0645\u06cc\u0646\u0644 \u0645\u06cc\u06ba \u0686\u0644\u062a\u06d2 \u0631\u06c1\u0646\u06d2 \u062f\u06cc\u06ba\u06d4<\/p>\n<p><strong>Linux\/macOS:<\/strong><\/p>\n<pre><code class=\"language-bash\">curl -X POST http:\/\/localhost:3000\/tasks \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"title\": \"Learn Docker\"}'\n\ncurl http:\/\/localhost:3000\/tasks\n\ncurl http:\/\/localhost:3000\/health\n<\/code><\/pre>\n<p><strong>\u0648\u0646\u0688\u0648\u0632 \u067e\u0627\u0648\u0631 \u0634\u06cc\u0644:<\/strong> \u0628\u0644\u06d2 \u0628\u0627\u0632 <code>curl<\/code> \u067e\u0627\u0648\u0631 \u0634\u06cc\u0644 \u0686\u0644\u0627\u0646\u06d2 \u0633\u06d2 <code>Invoke-WebRequest<\/code>\u0627\u0635\u0644 curls \u0646\u06c1\u06cc\u06ba. \u0686\u0644\u0627\u0626\u06cc\u06ba <code>curl.exe<\/code> \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2. JSON \u0628\u0627\u0688\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u067e\u06c1\u0644\u06d2 \u0627\u0633\u06d2 \u0641\u0627\u0626\u0644 \u0645\u06cc\u06ba \u0644\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-powershell\">'{\"title\": \"Learn Docker\"}' | Set-Content body.json\ncurl.exe -X POST http:\/\/localhost:3000\/tasks -H \"Content-Type: application\/json\" --data `@body.json\n\ncurl.exe http:\/\/localhost:3000\/tasks\n\ncurl.exe http:\/\/localhost:3000\/health\n<\/code><\/pre>\n<p>\u067e\u0686\u06be\u0644\u0627 \u0628\u06cc\u06a9 \u0679\u06a9 <code>@body.json<\/code> \u0622\u067e \u06a9\u0648 \u0627\u0633 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 \u0628\u0635\u0648\u0631\u062a \u062f\u06cc\u06af\u0631 \u067e\u0627\u0648\u0631 \u0634\u06cc\u0644 \u0627\u0633 \u06a9\u06cc \u062a\u0634\u0631\u06cc\u062d \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u06a9\u0648\u0634\u0634 \u06a9\u0631\u06d2 \u06af\u0627\u06d4 <code>@<\/code> \u06a9\u0631\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u06d2 \u0641\u0627\u0626\u0644 \u0646\u0627\u0645 \u06a9\u06d2 \u0633\u0627\u0628\u0642\u06c1 \u200b\u200b\u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u06c1\u0645 \u0627\u0633\u06d2 \u0627\u0633\u067e\u0644\u0679\u0646\u06af \u0622\u067e\u0631\u06cc\u0679\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0622\u067e \u06a9\u0648 \u0627\u0633 \u0637\u0631\u062d \u06a9\u0627 \u062c\u0648\u0627\u0628 \u0646\u0638\u0631 \u0622\u0626\u06d2 \u06af\u0627:<\/p>\n<pre><code class=\"language-json\"># POST \/tasks\n{\"id\":1,\"title\":\"Learn Docker\",\"completed\":false,\"created_at\":\"2026-07-09T22:21:17.073Z\"}\n\n# GET \/tasks\n[{\"id\":1,\"title\":\"Learn Docker\",\"completed\":false,\"created_at\":\"2026-07-09T22:21:17.073Z\"}]\n\n# GET \/health\n{\"status\":\"ok\",\"timestamp\":\"2026-07-09T22:11:44.700Z\"}\n<\/code><\/pre>\n<p>\u0646\u0648\u06a9\u0631\u06cc \u0627\u06cc\u06a9 \u06a9\u0646\u0679\u06cc\u0646\u0631 \u0633\u06d2 PostgreSQL \u062a\u06a9 \u067e\u06c1\u0646\u0686\u06cc \u0627\u0648\u0631 \u0627\u06cc\u067e \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0648\u0627\u067e\u0633 \u0622\u06af\u0626\u06cc\u06d4 <code>Ctrl+C<\/code> \u06a9\u0645\u067e\u0648\u0632 \u0679\u0631\u0645\u06cc\u0646\u0644 \u0645\u06cc\u06ba \u062f\u0648\u0646\u0648\u06ba \u06a9\u0648 \u0631\u0648\u06a9\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-automate-the-build-with-github-actions\">GitHub \u0627\u06cc\u06a9\u0634\u0646\u0632 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062e\u0648\u062f\u06a9\u0627\u0631 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/h2>\n<p>\u062a\u0635\u0648\u06cc\u0631 \u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0627\u0628 \u0622\u067e \u06a9\u0648 \u0627\u0633\u06d2 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0631\u0646\u0627 \u0628\u0646\u062f \u06a9\u0631\u0646\u0627 \u06c1\u0648\u06af\u0627\u06d4<\/p>\n<h3 id=\"heading-step-1-create-a-docker-hub-access-token\">\u0645\u0631\u062d\u0644\u06c1 1: \u0688\u0648\u06a9\u0631 \u06c1\u0628 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u06a9\u0627 \u0679\u0648\u06a9\u0646 \u0628\u0646\u0627\u0626\u06cc\u06ba<\/h3>\n<p>hub.docker.com \u067e\u0631 \u062c\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u0627\u06a9\u0627\u0624\u0646\u0679 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u2192 \u0633\u06cc\u06a9\u06cc\u0648\u0631\u0679\u06cc \u2192 \u0646\u06cc\u0627 \u0631\u0633\u0627\u0626\u06cc \u0679\u0648\u06a9\u0646 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u06cc\u06c1 \u0635\u0631\u0641 \u067e\u0691\u06be\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06c1\u06d2\u060c \u062a\u0648 \u067e\u0634 \u0631\u06a9 \u062c\u0627\u0626\u06d2 \u06af\u0627\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u067e\u0691\u06be\u0646\u06d2 \u0627\u0648\u0631 \u0644\u06a9\u06be\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a\u06cc\u06ba \u0633\u06cc\u0679 \u06a9\u0631\u06cc\u06ba\u06d4 \u0679\u0648\u06a9\u0646 \u0635\u0631\u0641 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0635\u0641\u062d\u06c1 \u0628\u0646\u062f \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u0633\u06d2 \u06a9\u0627\u067e\u06cc \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u0633\u06cc\u06a9\u0648\u0631\u0679\u06cc \u0627\u0646\u062a\u0628\u0627\u06c1:<\/strong> \u0627\u0633 \u0679\u0648\u06a9\u0646 \u06a9\u0648 \u0686\u06cc\u0679\u060c \u0627\u06cc \u0645\u06cc\u0644\u060c \u06cc\u0627 \u06a9\u0645\u0679 \u0645\u06cc\u06ba \u0686\u0633\u067e\u0627\u06ba \u0646\u06c1 \u06a9\u0631\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0627\u0633\u06d2 \u0628\u06d2 \u0646\u0642\u0627\u0628 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0627\u0633\u06d2 \u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062d\u0630\u0641 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0646\u06cc\u0627 \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-step-2-add-secrets-to-your-github-repository\">\u0645\u0631\u062d\u0644\u06c1 2: \u0627\u067e\u0646\u06d2 GitHub \u0630\u062e\u06cc\u0631\u06c1 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0631\u0627\u0632 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u2192 \u0631\u0627\u0632 \u0627\u0648\u0631 \u0645\u062a\u063a\u06cc\u0631\u0627\u062a \u2192 \u0627\u06cc\u06a9\u0634\u0646\u0632 \u0627\u0646 \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc \u067e\u0631 \u062c\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u062f\u0631\u062c \u0630\u06cc\u0644 \u06a9\u0648 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba:<\/p>\n<ul>\n<li>\n<p><code>DOCKERHUB_USERNAME<\/code>    &#8211; \u0688\u0648\u06a9\u0631 \u06c1\u0628 \u06a9\u0627 \u0635\u0627\u0631\u0641 \u0646\u0627\u0645<\/p>\n<\/li>\n<li>\n<p><code>DOCKERHUB_TOKEN<\/code>    \u0679\u0648\u06a9\u0646 \u06cc\u06c1\u0627\u06ba \u0686\u0633\u067e\u0627\u06ba \u06a9\u0631\u06cc\u06ba\u060c \u0627\u0633\u06d2 \u06a9\u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0646\u06c1 \u0686\u0633\u067e\u0627\u06ba \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<\/ul>\n<p>\u0627\u06af\u0631 \u0622\u067e \u0633\u06d2 \u0645\u0644\u0627\u0642\u0627\u062a \u06c1\u0648 \u062c\u0627\u0626\u06d2\u06d4 <code>Error: Username and password required<\/code>\u0631\u0627\u0632 \u0627\u0628\u06be\u06cc \u062a\u06a9 \u0645\u062d\u0641\u0648\u0638 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u0627 \u06c1\u06d2 \u06cc\u0627 \u0646\u0627\u0645 \u063a\u0644\u0637 \u062f\u0631\u062c \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u062f\u0648\u0646\u0648\u06ba \u06a9\u06cc\u0633 \u062d\u0633\u0627\u0633 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0622\u067e \u06a9\u06d2 \u0646\u0648\u0634\u062a\u06c1 \u062c\u0627\u062a \u0645\u06cc\u06ba \u0646\u0648\u0688 20 \u0641\u0631\u0633\u0648\u062f\u06af\u06cc \u06a9\u06d2 \u0627\u0646\u062a\u0628\u0627\u06c1\u0627\u062a \u062f\u06cc\u06a9\u06be\u0646\u0627 \u0645\u0639\u0645\u0648\u0644 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0688\u0648\u06a9\u0631 \u0622\u067e\u0631\u06cc\u0634\u0646\u0632 \u0633\u06d2 \u0622\u062a\u0627 \u06c1\u06d2\u060c \u0622\u067e \u06a9\u06d2 \u06a9\u0648\u0688 \u0633\u06d2 \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-step-3-create-the-workflow-file\">\u0645\u0631\u062d\u0644\u06c1 3: \u0648\u0631\u06a9 \u0641\u0644\u0648 \u0641\u0627\u0626\u0644 \u0628\u0646\u0627\u0626\u06cc\u06ba<\/h3>\n<p>\u0628\u0646\u0627\u0646\u0627 <code>.github\/workflows\/docker-publish.yml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">name: Build and Push Docker Image\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\nenv:\n  IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}\/nodejs-docker-cicd\n\njobs:\n  build-and-push:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout code\n        uses: actions\/checkout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker\/setup-buildx-action@v3\n\n      - name: Log in to Docker Hub\n        if: github.event_name != 'pull_request'\n        uses: docker\/login-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Extract metadata\n        id: meta\n        uses: docker\/metadata-action@v5\n        with:\n          images: ${{ env.IMAGE_NAME }}\n          tags: |\n            type=sha,prefix=sha-\n            type=raw,value=latest,enable={{is_default_branch}}\n\n      - name: Build and push\n        uses: docker\/build-push-action@v5\n        with:\n          context: .\n          target: production\n          push: ${{ github.event_name != 'pull_request' }}\n          tags: ${{ steps.meta.outputs.tags }}\n          labels: ${{ steps.meta.outputs.labels }}\n          cache-from: type=gha\n          cache-to: type=gha,mode=max\n<\/code><\/pre>\n<p>\u0644\u0627\u06af \u0627\u0646 \u0645\u0631\u062d\u0644\u06d2 \u067e\u0631 <code>if: github.event_name != 'pull_request'<\/code>. \u067e\u0644 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0648 \u0686\u06be\u0648\u0691 \u062f\u06cc\u06ba\u06d4 \u0641\u0648\u0631\u06a9 \u06a9\u06d2 PR \u06a9\u0648 \u0622\u067e \u06a9\u06d2 \u0631\u0627\u0632 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u062d\u0627\u0635\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0644\u0627\u06af \u0627\u0646 \u06a9\u06cc \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u06a9\u0648\u0634\u0634 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u06cc\u06d4 \u0688\u0648\u06a9\u0631 \u0641\u0627\u0626\u0644 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u0626\u06d2 \u06cc\u06c1 \u062a\u0639\u0645\u06cc\u0631 \u0627\u0628 \u0628\u06be\u06cc PR \u0633\u06d2 \u0686\u0644\u06d2 \u06af\u06cc\u060c \u0644\u06cc\u06a9\u0646 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u0622\u06af\u06d2 \u0646\u06c1\u06cc\u06ba \u0628\u0691\u06be\u0627\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p>\u0645\u06cc\u0679\u0627 \u0688\u06cc\u0679\u0627 \u0622\u067e\u0631\u06cc\u0634\u0646\u0632 \u06c1\u0631 \u0627\u0646\u0636\u0645\u0627\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062f\u0648 \u0679\u06cc\u06af \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>main<\/code>: <code>latest<\/code> \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0645\u062e\u062a\u0635\u0631 \u06a9\u0645\u0679 SHA \u0644\u0627\u0626\u06cc\u06a9 <code>sha-a1b2c3d<\/code>. SHA \u0679\u06cc\u06af\u0632 \u0631\u0648\u0644 \u0628\u06cc\u06a9\u0633 \u06a9\u0648 \u0639\u0645\u0644\u06cc \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06af\u0631 <code>latest<\/code> \u0627\u06af\u0631 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0631\u06a9 \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u062a\u0648 \u0648\u06c1 \u0633\u0628 \u06a9\u0686\u06be \u0648\u0627\u067e\u0633 \u0644\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u067e\u06c1\u0644\u06d2 \u062a\u06be\u0627\u06d4 <code>sha-<\/code> \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u0627\u0633\u06d2 \u0679\u06cc\u06af \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u06cc\u06c1 \u0633\u06cc\u06a9\u0646\u0688\u0648\u06ba \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0645\u0639\u0631\u0648\u0641 \u0627\u0686\u06be\u06cc \u062d\u0627\u0644\u062a \u0645\u06cc\u06ba \u0648\u0627\u067e\u0633 \u0622\u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06a9\u06c1 <code>cache-from\/cache-to: type=gha<\/code> \u0644\u0627\u0626\u0646 \u0688\u0648\u06a9\u0631 \u06a9\u06d2 \u0644\u06cc\u0626\u0631 \u06a9\u06cc\u0634\u06d2 \u06a9\u0648 \u06af\u0679 \u06c1\u0628 \u0627\u06cc\u06a9\u0634\u0646\u0632 \u06a9\u06d2 \u0628\u0644\u0679 \u0627\u0646 \u06a9\u06cc\u0634\u06d2 \u0645\u06cc\u06ba \u0627\u0633\u0679\u0648\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u067e\u06c1\u0644\u0627 \u0631\u0646 \u0634\u0631\u0648\u0639 \u0633\u06d2 \u0633\u0628 \u06a9\u0686\u06be \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u063a\u06cc\u0631 \u062a\u0628\u062f\u06cc\u0644 \u0634\u062f\u06c1 \u062a\u06c1\u0648\u06ba \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u06a9\u06cc\u0634\u06d2 \u0633\u06d2 \u0646\u06a9\u0627\u0644\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0639\u0627\u0645 Node.js \u0627\u06cc\u067e \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u062a\u0639\u0645\u06cc\u0631 \u06a9\u0627 \u0648\u0642\u062a 2-3 \u0645\u0646\u0679 \u0633\u06d2 \u06a9\u0645 \u06a9\u0631 \u06a9\u06d2 30 \u0633\u06cc\u06a9\u0646\u0688 \u0633\u06d2 \u06a9\u0645 \u06a9\u0631 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-push-and-watch-it-run\">\u062f\u0628\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0686\u0644\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u062f\u06cc\u06a9\u06be\u06cc\u06ba<\/h3>\n<pre><code class=\"language-bash\">git add .\ngit commit -m \"Add Docker configuration and GitHub Actions workflow\"\ngit push origin main\n<\/code><\/pre>\n<p>\u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc \u067e\u0631 \u062c\u0627\u0626\u06cc\u06ba\u06d4 <strong>\u0639\u0645\u0644<\/strong> \u0679\u06cc\u06af \u0622\u067e \u062d\u0642\u06cc\u0642\u06cc \u0648\u0642\u062a \u0645\u06cc\u06ba \u0648\u0631\u06a9 \u0641\u0644\u0648 \u06a9\u0648 \u0686\u0644\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u062f\u06cc\u06a9\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06c1\u0631 \u0642\u062f\u0645 \u0645\u06a9\u0645\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc \u06cc\u06c1 \u0633\u0628\u0632 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-plaintext\">&#x2705; Checkout code\n&#x2705; Set up Docker Buildx\n&#x2705; Log in to Docker Hub\n&#x2705; Extract metadata\n&#x2705; Build and push\n<\/code><\/pre>\n<p>\u0645\u062c\u0645\u0648\u0639\u06cc \u0637\u0648\u0631 \u067e\u0631\u060c \u0633\u0628\u0632 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u062a\u0635\u0648\u06cc\u0631 Docker Hub \u067e\u0631 \u0634\u0627\u0626\u0639 \u06a9\u06cc \u06af\u0626\u06cc \u06c1\u06d2\u06d4 \u062f\u0648 \u0679\u06cc\u06af\u060c <code>latest<\/code> \u0627\u0648\u0631 SHA \u06a9\u0627 \u0639\u06c1\u062f \u06a9\u0631\u06cc\u06ba\u06d4 <code>sha-a1b2c3d<\/code>. \u06c1\u0631 \u062f\u06be\u06a9\u0627 <code>main<\/code> \u06cc\u06c1 \u06cc\u06c1\u0627\u06ba \u0633\u06d2 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0628\u0646\u0627\u06cc\u0627 \u0627\u0648\u0631 \u0628\u06be\u06cc\u062c \u062f\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-deploying-the-image\">\u062a\u0635\u0648\u06cc\u0631 \u06a9\u06cc \u062a\u0639\u06cc\u0646\u0627\u062a\u06cc<\/h2>\n<p>Docker Hub \u06a9\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u0622\u067e \u06a9\u0648 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0627\u0646\u0641\u0631\u0627\u0633\u0679\u0631\u06a9\u0686\u0631 \u067e\u0631 \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc VPS \u06cc\u0627 \u0633\u0631\u0648\u0631:<\/strong><\/p>\n<pre><code class=\"language-bash\">docker pull yourusername\/nodejs-docker-cicd:latest\ndocker run -d -p 3000:3000 \\\n  -e DB_HOST=your-db-host \\\n  -e DB_NAME=tasksdb \\\n  -e DB_USER=postgres \\\n  -e DB_PASSWORD=yourpassword \\\n  yourusername\/nodejs-docker-cicd:latest\n<\/code><\/pre>\n<p><strong>\u0631\u06cc\u0644\u0648\u06d2<\/strong> \u2014 \u0627\u067e\u0646\u06cc \u0688\u0648\u06a9\u0631 \u06c1\u0628 \u0627\u0645\u06cc\u062c \u06a9\u0648 \u0631\u06cc\u0644 \u0631\u0648\u0688 \u0688\u06cc\u0634 \u0628\u0648\u0631\u0688 \u0633\u06d2 \u062c\u0648\u0691\u06cc\u06ba \u0627\u0648\u0631 \u06cc\u06c1 \u0622\u067e \u06a9\u06d2 \u0627\u06af\u0644\u06d2 \u067e\u0634 \u067e\u0631 \u0644\u06af\u0627\u0626\u06cc \u062c\u0627\u0626\u06d2 \u06af\u06cc\u06d4<\/p>\n<p><strong>Fly.io<\/strong> &#8211;.\u062f\u0648\u0691\u0646\u0627 n <code>fly launch<\/code> \u0628\u0633 \u0627\u067e\u0646\u06d2 \u0688\u0627\u06a9\u0631 \u0641\u0627\u0626\u0644 \u06a9\u06cc \u0637\u0631\u0641 \u0627\u0634\u0627\u0631\u06c1 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0641\u0644\u0627\u0626\u06cc \u0628\u0627\u0642\u06cc \u06a9\u0627 \u062e\u06cc\u0627\u0644 \u0631\u06a9\u06be\u06d2 \u06af\u06cc\u06d4<\/p>\n<p><strong>\u06a9\u06be\u0691\u0627<\/strong> &#8211; \u0688\u0648\u06a9\u0631 \u06c1\u0628 \u0627\u0645\u06cc\u062c \u06cc\u0648 \u0622\u0631 \u0627\u06cc\u0644 \u06a9\u0648 \u0631\u06cc\u0646\u0688\u0631 \u0633\u0631\u0648\u0633 \u0633\u06cc\u0679\u0646\u06af\u0632 \u0645\u06cc\u06ba \u0686\u0633\u067e\u0627\u06ba \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u06c1\u0631 \u062f\u06be\u06a9\u0627 <code>main<\/code> \u0648\u0631\u06a9 \u0641\u0644\u0648 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4 \u0646\u0626\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 Docker Hub \u0645\u06cc\u06ba \u0645\u0646\u062a\u0642\u0644 \u06a9\u0631 \u062f\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u067e\u0644\u06cc\u0679 \u0641\u0627\u0631\u0645 \u0627\u0633\u06d2 \u0627\u0679\u06be\u0627 \u0644\u06d2 \u06af\u0627\u06d4 \u0627\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u0642\u0633\u06cc\u0645 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-wrapping-up\">\u062e\u062a\u0645<\/h2>\n<p>\u0645\u0642\u0627\u0645\u06cc Node.js \u0627\u06cc\u067e \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0634\u0631\u0648\u0639 \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0686\u06cc\u0632 \u0627\u0628 \u0627\u06cc\u06a9 \u06a9\u0646\u0679\u06cc\u0646\u0631 \u0645\u06cc\u06ba \u0686\u0644\u062a\u06cc \u06c1\u06d2\u06d4 \u0622\u067e \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0645\u0634\u06cc\u0646 \u067e\u0631\u060c \u0627\u0635\u0644 PostgreSQL \u067e\u0631 \u062c\u0648 \u0622\u067e \u062a\u06cc\u0627\u0631 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u060c \u06cc\u0627 \u062c\u0633 \u067e\u0627\u0626\u067e \u0644\u0627\u0626\u0646 \u0645\u06cc\u06ba \u0622\u067e \u0688\u0648\u06a9\u0631 \u06c1\u0628 \u06a9\u0648 \u0628\u0646\u0627\u062a\u06d2 \u0627\u0648\u0631 \u067e\u06cc\u0634 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0633 \u067e\u0631 \u0622\u067e \u06a9\u0648 \u0627\u06cc\u0633\u0627 \u06c1\u06cc \u0628\u0631\u062a\u0627\u0624 \u062d\u0627\u0635\u0644 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u0628\u063a\u06cc\u0631 \u062f\u06be\u06a9\u06d2 \u06a9\u06d2 \u0628\u0639\u062f \u06a9\u0686\u06be \u06a9\u0631\u0646\u06d2 \u06a9\u06d2\u06d4<\/p>\n<p>\u0645\u0644\u0679\u06cc \u0633\u0679\u06cc\u067e \u0628\u0644\u0688\u0632 \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0648 \u062c\u0627\u0645\u0639 \u0631\u06a9\u06be\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0688\u0648\u06cc\u0644\u067e\u0645\u0646\u0679 \u0679\u0648\u0644\u0632 \u06a9\u0648 \u0627\u06a9\u06cc\u0644\u0627 \u0686\u06be\u0648\u0691 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u060c \u063a\u06cc\u0631 \u062c\u0691 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0648\u06ba \u06a9\u0648 \u062e\u0627\u0631\u062c \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0635\u062d\u062a \u06a9\u06cc \u062c\u0627\u0646\u0686 \u0628\u06be\u06cc \u0634\u0627\u0645\u0644 \u06c1\u06d2\u06d4 \u06a9\u0645\u067e\u0648\u0632 \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc \u06a9\u0648 \u06a9\u0644\u0648\u0646 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0634\u062e\u0635 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u06a9\u0645\u0627\u0646\u0688 \u0645\u06cc\u06ba \u067e\u0648\u0631\u06d2 \u0627\u0633\u0679\u06cc\u06a9 \u06a9\u0648 \u0622\u0632\u0627\u062f \u06a9\u0631 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 GitHub \u0627\u06cc\u06a9\u0634\u0646\u0632 \u0645\u06cc\u06ba SHA \u0679\u06cc\u06af\u0632 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0631\u0648\u0644 \u0628\u06cc\u06a9 \u0635\u0631\u0641 \u067e\u0631\u0627\u0646\u06d2 \u0679\u06cc\u06af \u06a9\u0648 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0645\u0639\u0627\u0645\u0644\u06c1 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1\u06cc \u067e\u06cc\u0679\u0631\u0646 (\u0645\u0644\u0679\u06cc \u0627\u0633\u0679\u06cc\u062c \u0628\u0644\u0688\u0632\u060c \u06a9\u0645\u067e\u0648\u0632 \u0641\u0627\u0631 \u0644\u0648\u06a9\u0644 \u0688\u06cc\u0648\u0644\u067e\u0645\u0646\u0679\u060c \u062e\u0648\u062f\u06a9\u0627\u0631 \u0627\u0645\u06cc\u062c \u067e\u0628\u0644\u0634\u0646\u06af) \u067e\u0648\u0631\u06cc \u0635\u0646\u0639\u062a \u0645\u06cc\u06ba Node.js \u06a9\u06cc \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u0627\u0646 \u0646\u0645\u0648\u0646\u0648\u06ba \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0648\u06c1 \u0622\u067e \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0645\u0646\u0635\u0648\u0628\u0648\u06ba \u067e\u0631 \u0622\u067e \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<p>\u0622\u067e \u0627\u067e\u0646\u06cc \u067e\u0627\u0626\u067e \u0644\u0627\u0626\u0646 \u06a9\u0648 \u06cc\u06c1\u0627\u06ba \u0628\u0691\u06be\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u0639\u0645\u0627\u0631\u062a \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0679\u06cc\u0633\u0679 \u06a9\u06d2 \u0645\u0631\u0627\u062d\u0644 \u0634\u0627\u0645\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06cc\u0627 \u0627\u06af\u0631 \u0622\u067e ARM \u06a9\u0648 \u0646\u0634\u0627\u0646\u06c1 \u0628\u0646\u0627 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0645\u0644\u0679\u06cc \u067e\u0644\u06cc\u0679 \u0641\u0627\u0631\u0645 \u0633\u067e\u0648\u0631\u0679 \u0634\u0627\u0645\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u062c\u0628 \u0688\u0648\u06a9\u0631 \u06a9\u0645\u067e\u0648\u0632 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0645\u06cc\u06ba \u0645\u062d\u062f\u0648\u062f \u0645\u062d\u0633\u0648\u0633 \u06a9\u0631\u0646\u06d2 \u0644\u06af\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0628\u0631\u0646\u06cc\u0679\u0633 \u06a9\u0627\u0645 \u0645\u06cc\u06ba \u0622\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0627\u06af\u0631 \u0622\u067e \u0646\u06d2 \u06a9\u0628\u06be\u06cc Node.js \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0628\u0646\u0627\u06cc\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0622\u067e \u0646\u06d2 \u0634\u0627\u06cc\u062f \u0627\u0633 \u0637\u0631\u062d \u06a9\u0627 \u062a\u062c\u0631\u0628\u06c1 \u06a9\u06cc\u0627 \u06c1\u0648\u06af\u0627\u06d4 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0645\u06cc\u0631\u06d2 \u06a9\u0645\u067e\u06cc\u0648\u0679\u0631 \u067e\u0631 \u0679\u06be\u06cc\u06a9 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u062c\u0628 \u0645\u06cc\u06ba \u0627\u0633\u06d2 \u0633\u0631\u0648\u0631 \u067e\u0631 \u062f\u06be\u06a9\u06cc\u0644\u062a\u0627 \u06c1\u0648\u06ba \u062a\u0648 \u06a9\u0686\u06be \u063a\u0644\u0637 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0645\u062e\u062a\u0644\u0641 \u0646\u0648\u0688 \u0648\u0631\u0698\u0646\u060c \u0644\u0627\u067e\u062a\u06c1 \u0645\u0627\u062d\u0648\u0644\u06cc\u0627\u062a\u06cc \u0645\u062a\u063a\u06cc\u0631\u0627\u062a\u060c \u06cc\u0627 \u063a\u06cc\u0631 \u0645\u0645\u0627\u062b\u0644 \u0646\u0638\u0627\u0645 \u0627\u0646\u062d\u0635\u0627\u0631 \u06c1\u0648\u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-26749","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/26749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/comments?post=26749"}],"version-history":[{"count":0,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/26749\/revisions"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/media?parent=26749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/categories?post=26749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/tags?post=26749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}