{"id":759,"date":"2025-01-11T22:46:25","date_gmt":"2025-01-11T22:46:25","guid":{"rendered":"https:\/\/gratisvps.net\/blog\/?p=759"},"modified":"2025-01-11T22:46:25","modified_gmt":"2025-01-11T22:46:25","slug":"setting-up-a-web-application-stack-with-docker-on-ubuntu-vps","status":"publish","type":"post","link":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/","title":{"rendered":"Setting Up a Web Application Stack with Docker on Ubuntu VPS"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Setting_Up_a_Web_Application_Stack_with_Docker_on_Ubuntu_VPS\" >Setting Up a Web Application Stack with Docker on Ubuntu VPS<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_1_Connect_to_Your_VPS\" >Step 1: Connect to Your VPS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_2_Update_Your_System\" >Step 2: Update Your System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_3_Install_Docker\" >Step 3: Install Docker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_4_Install_Docker_Compose\" >Step 4: Install Docker Compose<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_5_Create_a_Sample_Nodejs_Application\" >Step 5: Create a Sample Node.js Application<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_6_Set_Up_Dockerfile\" >Step 6: Set Up Dockerfile<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_7_Set_Up_MongoDB_with_Docker\" >Step 7: Set Up MongoDB with Docker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_8_Build_and_Run_the_Application\" >Step 8: Build and Run the Application<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_9_Test_Your_Application\" >Step 9: Test Your Application<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_10_Manage_Your_Docker_Containers\" >Step 10: Manage Your Docker Containers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_11_Persist_MongoDB_Data\" >Step 11: Persist MongoDB Data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_12_Security_Considerations\" >Step 12: Security Considerations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Step_13_Deploying_to_Production\" >Step 13: Deploying to Production<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 id=\"tutorial-setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\"><span class=\"ez-toc-section\" id=\"Setting_Up_a_Web_Application_Stack_with_Docker_on_Ubuntu_VPS\"><\/span>Setting Up a Web Application Stack with Docker on Ubuntu VPS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 id=\"introduction\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In this tutorial, you&#8217;ll learn how to set up a web application stack on a VPS using Docker. We will deploy a simple Node.js application with Express and MongoDB as the database. Docker allows you to containerize your applications, making them portable and easy to manage.<br \/>\n<\/p>\n<h3 id=\"prerequisites\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol start=\"1\">\n<li><strong>A VPS running Ubuntu 20.04 or later.<\/strong><\/li>\n<li><strong>SSH access to your server.<\/strong><\/li>\n<li><strong>Basic knowledge of command-line operations.<\/strong><\/li>\n<\/ol>\n<h3 id=\"step-1-connect-to-your-vps\"><span class=\"ez-toc-section\" id=\"Step_1_Connect_to_Your_VPS\"><\/span>Step 1: Connect to Your VPS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>First, open your terminal and connect to your VPS via SSH:<\/p>\n<pre><code class=\"lang-bash hljs language-bash\">ssh username@your_server_ip<\/code><\/pre>\n<p>Replace\u00a0<code>username<\/code>\u00a0with your actual username and\u00a0<code>your_server_ip<\/code>\u00a0with your VPS&#8217;s IP address.<\/p>\n<h3 id=\"step-2-update-your-system\"><span class=\"ez-toc-section\" id=\"Step_2_Update_Your_System\"><\/span>Step 2: Update Your System<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Once connected, it&#8217;s a good practice to update your system:<\/p>\n<pre><code class=\"lang-bash hljs language-bash\">sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<h3 id=\"step-3-install-docker\"><span class=\"ez-toc-section\" id=\"Step_3_Install_Docker\"><\/span>Step 3: Install Docker<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Next, we will install Docker, which allows us to run applications in containers.<\/p>\n<ol start=\"1\">\n<li><strong>Install required packages:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">sudo apt install apt-transport-https ca-certificates curl software-properties-common -y<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>Add the Docker GPG key:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>Add the Docker APT repository:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">sudo add-apt-repository <span class=\"hljs-string\">\"deb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu <span class=\"hljs-subst\">$(lsb_release -cs)<\/span> stable\"<\/span><\/code><\/pre>\n<ol start=\"4\">\n<li><strong>Update the package index again:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">sudo apt update<\/code><\/pre>\n<ol start=\"5\">\n<li><strong>Install Docker:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">sudo apt install docker-ce -y<\/code><\/pre>\n<ol start=\"6\">\n<li><strong>Verify that Docker is installed:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">sudo systemctl status docker<\/code><\/pre>\n<p>You should see that the Docker service is active and running.<\/p>\n<h3 id=\"step-4-install-docker-compose\"><span class=\"ez-toc-section\" id=\"Step_4_Install_Docker_Compose\"><\/span>Step 4: Install Docker Compose<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Docker Compose is a tool for defining and running multi-container Docker applications. To install it:<\/p>\n<ol start=\"1\">\n<li><strong>Download the Docker Compose binary:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">sudo curl -L <span class=\"hljs-string\">\"https:\/\/github.com\/docker\/compose\/releases\/latest\/download\/docker-compose-<span class=\"hljs-subst\">$(uname -s)<\/span>-<span class=\"hljs-subst\">$(uname -m)<\/span>\"<\/span> -o \/usr\/local\/bin\/docker-compose<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>Set permissions:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">sudo <span class=\"hljs-built_in\">chmod<\/span> +x \/usr\/local\/bin\/docker-compose<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>Check the installed version:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">docker-compose --version<\/code><\/pre>\n<h3 id=\"step-5-create-a-sample-nodejs-application\"><span class=\"ez-toc-section\" id=\"Step_5_Create_a_Sample_Nodejs_Application\"><\/span>Step 5: Create a Sample Node.js Application<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now that Docker is installed, let\u2019s create a simple <a href=\"https:\/\/nodejs.org\/en\">Node.js<\/a> application.<\/p>\n<ol start=\"1\">\n<li><strong>Create a project directory:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\"><span class=\"hljs-built_in\">mkdir<\/span> my-node-app &amp;&amp; <span class=\"hljs-built_in\">cd<\/span> my-node-app<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>Create a\u00a0<code>package.json<\/code>\u00a0file:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">npm init -y<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>Install Express.js:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">npm install express<\/code><\/pre>\n<ol start=\"4\">\n<li><strong>Create an\u00a0<code>app.js<\/code>\u00a0file:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">nano app.js<\/code><\/pre>\n<p>Add the following code to set up a simple Express server:<\/p>\n<pre><code class=\"lang-javascript hljs language-javascript\"><span class=\"hljs-keyword\">const<\/span> express = <span class=\"hljs-built_in\">require<\/span>(<span class=\"hljs-string\">'express'<\/span>);\r\n<span class=\"hljs-keyword\">const<\/span> mongoose = <span class=\"hljs-built_in\">require<\/span>(<span class=\"hljs-string\">'mongoose'<\/span>);\r\n\r\n<span class=\"hljs-keyword\">const<\/span> app = <span class=\"hljs-title function_\">express<\/span>();\r\n<span class=\"hljs-keyword\">const<\/span> <span class=\"hljs-variable constant_\">PORT<\/span> = process.<span class=\"hljs-property\">env<\/span>.<span class=\"hljs-property\">PORT<\/span> || <span class=\"hljs-number\">3000<\/span>;\r\n\r\n<span class=\"hljs-comment\">\/\/ Middleware to parse JSON  <\/span>\r\napp.<span class=\"hljs-title function_\">use<\/span>(express.<span class=\"hljs-title function_\">json<\/span>());\r\n\r\n<span class=\"hljs-comment\">\/\/ Connect to MongoDB  <\/span>\r\nmongoose.<span class=\"hljs-title function_\">connect<\/span>(<span class=\"hljs-string\">'mongodb:\/\/mongo:27017\/mydatabase'<\/span>, { \r\n    <span class=\"hljs-attr\">useNewUrlParser<\/span>: <span class=\"hljs-literal\">true<\/span>, \r\n    <span class=\"hljs-attr\">useUnifiedTopology<\/span>: <span class=\"hljs-literal\">true<\/span> \r\n});\r\n\r\n<span class=\"hljs-comment\">\/\/ Define a simple route  <\/span>\r\napp.<span class=\"hljs-title function_\">get<\/span>(<span class=\"hljs-string\">'\/'<\/span>, <span class=\"hljs-function\">(<span class=\"hljs-params\">req, res<\/span>) =&gt;<\/span> {\r\n    res.<span class=\"hljs-title function_\">send<\/span>(<span class=\"hljs-string\">'Hello World from Node.js!'<\/span>);\r\n});\r\n\r\n<span class=\"hljs-comment\">\/\/ Start the server  <\/span>\r\napp.<span class=\"hljs-title function_\">listen<\/span>(<span class=\"hljs-variable constant_\">PORT<\/span>, <span class=\"hljs-function\">() =&gt;<\/span> {\r\n    <span class=\"hljs-variable language_\">console<\/span>.<span class=\"hljs-title function_\">log<\/span>(<span class=\"hljs-string\">`Server is running on http:\/\/localhost:<span class=\"hljs-subst\">${PORT}<\/span>`<\/span>);\r\n});<\/code><\/pre>\n<h3 id=\"step-6-set-up-dockerfile\"><span class=\"ez-toc-section\" id=\"Step_6_Set_Up_Dockerfile\"><\/span>Step 6: Set Up Dockerfile<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Next, we need to create a\u00a0<code>Dockerfile<\/code>\u00a0to define how our Node.js application will run in a container.<\/p>\n<ol start=\"1\">\n<li><strong>Create a\u00a0<code>Dockerfile<\/code>:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">nano Dockerfile<\/code><\/pre>\n<p>Add the following content:<\/p>\n<pre><code class=\"lang-Dockerfile\"># Use the official Node.js image  \r\nFROM node:14\r\n\r\n# Set the working directory  \r\nWORKDIR \/usr\/src\/app\r\n\r\n# Copy package.json and install dependencies  \r\nCOPY package*.json .\/\r\nRUN npm install\r\n\r\n# Copy the application code  \r\nCOPY . .\r\n\r\n# Expose the application port  \r\nEXPOSE 3000\r\n\r\n# Command to run the application  \r\nCMD [\"node\", \"app.js\"]<\/code><\/pre>\n<h3 id=\"step-7-set-up-mongodb-with-docker\"><span class=\"ez-toc-section\" id=\"Step_7_Set_Up_MongoDB_with_Docker\"><\/span>Step 7: Set Up MongoDB with Docker<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>We will run MongoDB in a separate container. To do this, create a\u00a0<code>docker-compose.yml<\/code>\u00a0file:<\/p>\n<ol start=\"1\">\n<li><strong>Create the\u00a0<code>docker-compose.yml<\/code>\u00a0file:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">nano docker-compose.yml<\/code><\/pre>\n<p>Add the following content to define the services:<\/p>\n<pre><code class=\"lang-yaml hljs language-yaml\"><span class=\"hljs-attr\">version:<\/span> <span class=\"hljs-string\">'3.8'<\/span>\r\n\r\n<span class=\"hljs-attr\">services:<\/span>\r\n  <span class=\"hljs-attr\">mongo:<\/span>\r\n    <span class=\"hljs-attr\">image:<\/span> <span class=\"hljs-string\">mongo:latest<\/span>  \r\n    <span class=\"hljs-attr\">container_name:<\/span> <span class=\"hljs-string\">mongo<\/span>  \r\n    <span class=\"hljs-attr\">ports:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">\"27017:27017\"<\/span>\r\n    <span class=\"hljs-attr\">networks:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">my-network<\/span>\r\n\r\n  <span class=\"hljs-attr\">web:<\/span>\r\n    <span class=\"hljs-attr\">build:<\/span> <span class=\"hljs-string\">.<\/span>\r\n    <span class=\"hljs-attr\">container_name:<\/span> <span class=\"hljs-string\">node-app<\/span>  \r\n    <span class=\"hljs-attr\">ports:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">\"3000:3000\"<\/span>\r\n    <span class=\"hljs-attr\">depends_on:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">mongo<\/span>  \r\n    <span class=\"hljs-attr\">networks:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">my-network<\/span>\r\n\r\n<span class=\"hljs-attr\">networks:<\/span>\r\n  <span class=\"hljs-attr\">my-network:<\/span>\r\n    <span class=\"hljs-attr\">driver:<\/span> <span class=\"hljs-string\">bridge<\/span><\/code><\/pre>\n<h3 id=\"step-8-build-and-run-the-application\"><span class=\"ez-toc-section\" id=\"Step_8_Build_and_Run_the_Application\"><\/span>Step 8: Build and Run the Application<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now, with everything set up, you can build and run your application using Docker Compose.<\/p>\n<ol start=\"1\">\n<li><strong>Build the Docker images and start the containers:<\/strong><\/li>\n<\/ol>\n<pre><code class=\"lang-bash hljs language-bash\">docker-compose up --build<\/code><\/pre>\n<p>This command will build your Node.js application and start both the Node.js and MongoDB containers.<\/p>\n<h3 id=\"step-9-test-your-application\"><span class=\"ez-toc-section\" id=\"Step_9_Test_Your_Application\"><\/span>Step 9: Test Your Application<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Once everything is running, you can test your application by visiting:<\/p>\n<pre><code class=\"hljs language-bash\">http:\/\/your_server_ip:3000<\/code><\/pre>\n<p>You should see the message &#8220;Hello World from Node.js!&#8221;.<\/p>\n<h3 id=\"step-10-manage-your-docker-containers\"><span class=\"ez-toc-section\" id=\"Step_10_Manage_Your_Docker_Containers\"><\/span>Step 10: Manage Your Docker Containers<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>With Docker, managing your containers is straightforward. Here are some useful commands:<\/p>\n<ul>\n<li><strong>List running containers:<\/strong><\/li>\n<\/ul>\n<pre><code class=\"lang-bash hljs language-bash\">docker ps<\/code><\/pre>\n<ul>\n<li><strong>Stop the containers:<\/strong><\/li>\n<\/ul>\n<pre><code class=\"lang-bash hljs language-bash\">docker-compose down<\/code><\/pre>\n<ul>\n<li><strong>Start the containers again:<\/strong><\/li>\n<\/ul>\n<pre><code class=\"lang-bash hljs language-bash\">docker-compose up<\/code><\/pre>\n<ul>\n<li><strong>View logs:<\/strong><\/li>\n<\/ul>\n<pre><code class=\"lang-bash hljs language-bash\">docker-compose logs<\/code><\/pre>\n<h3 id=\"step-11-persist-mongodb-data\"><span class=\"ez-toc-section\" id=\"Step_11_Persist_MongoDB_Data\"><\/span>Step 11: Persist MongoDB Data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>By default, MongoDB will store its data in a temporary volume, which means if you restart your containers, any data will be lost. To persist the data, you can modify the\u00a0<code>docker-compose.yml<\/code>\u00a0file to include a volume for MongoDB.<\/p>\n<pre><code class=\"lang-yaml hljs language-yaml\">  <span class=\"hljs-attr\">mongo:<\/span>\r\n    <span class=\"hljs-attr\">image:<\/span> <span class=\"hljs-string\">mongo:latest<\/span>  \r\n    <span class=\"hljs-attr\">container_name:<\/span> <span class=\"hljs-string\">mongo<\/span>  \r\n    <span class=\"hljs-attr\">ports:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">\"27017:27017\"<\/span>\r\n    <span class=\"hljs-attr\">volumes:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">mongo-data:\/data\/db<\/span>  \r\n    <span class=\"hljs-attr\">networks:<\/span>\r\n      <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">my-network<\/span>\r\n\r\n<span class=\"hljs-attr\">volumes:<\/span>\r\n  <span class=\"hljs-attr\">mongo-data:<\/span><\/code><\/pre>\n<h3 id=\"step-12-security-considerations\"><span class=\"ez-toc-section\" id=\"Step_12_Security_Considerations\"><\/span>Step 12: Security Considerations<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>When deploying applications, security is crucial. Here are some practices to consider:<\/p>\n<ol start=\"1\">\n<li><strong>Use environment variables<\/strong>\u00a0for sensitive information like database credentials instead of hardcoding them in your application.<\/li>\n<li><strong>Limit access to your MongoDB instance<\/strong>\u00a0by configuring authentication.<\/li>\n<li><strong>Set up a firewall<\/strong>\u00a0(like UFW on Ubuntu) to restrict access to your server.<\/li>\n<\/ol>\n<h3 id=\"step-13-deploying-to-production\"><span class=\"ez-toc-section\" id=\"Step_13_Deploying_to_Production\"><\/span>Step 13: Deploying to Production<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For production deployment, consider the following:<\/p>\n<ol start=\"1\">\n<li><strong>Use a reverse proxy<\/strong>\u00a0like Nginx to handle incoming requests and route them to your Node.js application.<\/li>\n<li><strong>Set up HTTPS<\/strong>\u00a0to secure connections using Let\u2019s Encrypt.<\/li>\n<li><strong>Monitor application performance<\/strong>\u00a0and logs to track any issues.<\/li>\n<\/ol>\n<h3 id=\"conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Congratulations! You\u2019ve successfully set up a full web application <a href=\"https:\/\/gratisvps.net\/blog\/installing-the-lamp-stack-on-ubuntu-vps\/\">stack<\/a> using Docker on an Ubuntu VPS. You learned how to create a simple Node.js application, containerize it with Docker, and run it alongside MongoDB. This environment is ideal for development and can be extended for production use with some additional configurations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setting Up a Web Application Stack with Docker on Ubuntu VPS Introduction In this tutorial, you&#8217;ll learn how to set [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":762,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[216,215,210],"tags":[109,217,211],"class_list":["post-759","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application","category-tutorial","category-ubuntu","tag-docker","tag-stack","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Setting Up a Web Application Stack with Docker on Ubuntu VPS<\/title>\n<meta name=\"description\" content=\"Docker on Ubuntu VPS allows you to containerize your applications, making them portable and easy to manage.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting Up a Web Application Stack with Docker on Ubuntu VPS\" \/>\n<meta property=\"og:description\" content=\"Docker on Ubuntu VPS allows you to containerize your applications, making them portable and easy to manage.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"Free VPS Hosting Guides\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-11T22:46:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2025\/01\/docker-ubuntu.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"832\" \/>\n\t<meta property=\"og:image:height\" content=\"448\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"ariete\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ariete\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/\"},\"author\":{\"name\":\"ariete\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#\\\/schema\\\/person\\\/cddcf8cb5192d0713c19b79425c77fc4\"},\"headline\":\"Setting Up a Web Application Stack with Docker on Ubuntu VPS\",\"datePublished\":\"2025-01-11T22:46:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/\"},\"wordCount\":614,\"publisher\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/docker-ubuntu.jpg\",\"keywords\":[\"Docker\",\"stack\",\"Ubuntu\"],\"articleSection\":[\"Application\",\"Tutorial\",\"Ubuntu\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/\",\"name\":\"Setting Up a Web Application Stack with Docker on Ubuntu VPS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/docker-ubuntu.jpg\",\"datePublished\":\"2025-01-11T22:46:25+00:00\",\"description\":\"Docker on Ubuntu VPS allows you to containerize your applications, making them portable and easy to manage.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/docker-ubuntu.jpg\",\"contentUrl\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/docker-ubuntu.jpg\",\"width\":832,\"height\":448,\"caption\":\"docker-ubuntu\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting Up a Web Application Stack with Docker on Ubuntu VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/\",\"name\":\"Gratisvps.net | Blog Daily Tech Info\",\"description\":\"GratisVPS.NET\",\"publisher\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#organization\",\"name\":\"Gratisvps.net | Blog Daily Tech Info\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/logo.png\",\"width\":250,\"height\":67,\"caption\":\"Gratisvps.net | Blog Daily Tech Info\"},\"image\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#\\\/schema\\\/person\\\/cddcf8cb5192d0713c19b79425c77fc4\",\"name\":\"ariete\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g\",\"caption\":\"ariete\"},\"sameAs\":[\"https:\\\/\\\/gratisvps.net\\\/blog\"],\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/author\\\/ariete\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Setting Up a Web Application Stack with Docker on Ubuntu VPS","description":"Docker on Ubuntu VPS allows you to containerize your applications, making them portable and easy to manage.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/","og_locale":"en_US","og_type":"article","og_title":"Setting Up a Web Application Stack with Docker on Ubuntu VPS","og_description":"Docker on Ubuntu VPS allows you to containerize your applications, making them portable and easy to manage.","og_url":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/","og_site_name":"Free VPS Hosting Guides","article_published_time":"2025-01-11T22:46:25+00:00","og_image":[{"width":832,"height":448,"url":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2025\/01\/docker-ubuntu.jpg","type":"image\/jpeg"}],"author":"ariete","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ariete","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#article","isPartOf":{"@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/"},"author":{"name":"ariete","@id":"https:\/\/gratisvps.net\/blog\/#\/schema\/person\/cddcf8cb5192d0713c19b79425c77fc4"},"headline":"Setting Up a Web Application Stack with Docker on Ubuntu VPS","datePublished":"2025-01-11T22:46:25+00:00","mainEntityOfPage":{"@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/"},"wordCount":614,"publisher":{"@id":"https:\/\/gratisvps.net\/blog\/#organization"},"image":{"@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2025\/01\/docker-ubuntu.jpg","keywords":["Docker","stack","Ubuntu"],"articleSection":["Application","Tutorial","Ubuntu"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/","url":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/","name":"Setting Up a Web Application Stack with Docker on Ubuntu VPS","isPartOf":{"@id":"https:\/\/gratisvps.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#primaryimage"},"image":{"@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2025\/01\/docker-ubuntu.jpg","datePublished":"2025-01-11T22:46:25+00:00","description":"Docker on Ubuntu VPS allows you to containerize your applications, making them portable and easy to manage.","breadcrumb":{"@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#primaryimage","url":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2025\/01\/docker-ubuntu.jpg","contentUrl":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2025\/01\/docker-ubuntu.jpg","width":832,"height":448,"caption":"docker-ubuntu"},{"@type":"BreadcrumbList","@id":"https:\/\/gratisvps.net\/blog\/setting-up-a-web-application-stack-with-docker-on-ubuntu-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gratisvps.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Setting Up a Web Application Stack with Docker on Ubuntu VPS"}]},{"@type":"WebSite","@id":"https:\/\/gratisvps.net\/blog\/#website","url":"https:\/\/gratisvps.net\/blog\/","name":"Gratisvps.net | Blog Daily Tech Info","description":"GratisVPS.NET","publisher":{"@id":"https:\/\/gratisvps.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gratisvps.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/gratisvps.net\/blog\/#organization","name":"Gratisvps.net | Blog Daily Tech Info","url":"https:\/\/gratisvps.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gratisvps.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/10\/logo.png","contentUrl":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/10\/logo.png","width":250,"height":67,"caption":"Gratisvps.net | Blog Daily Tech Info"},"image":{"@id":"https:\/\/gratisvps.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/gratisvps.net\/blog\/#\/schema\/person\/cddcf8cb5192d0713c19b79425c77fc4","name":"ariete","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g","caption":"ariete"},"sameAs":["https:\/\/gratisvps.net\/blog"],"url":"https:\/\/gratisvps.net\/blog\/author\/ariete\/"}]}},"_links":{"self":[{"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/posts\/759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/comments?post=759"}],"version-history":[{"count":3,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/posts\/759\/revisions"}],"predecessor-version":[{"id":763,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/posts\/759\/revisions\/763"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/media\/762"}],"wp:attachment":[{"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/media?parent=759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/categories?post=759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/tags?post=759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}