mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
10 KiB
1 lines
10 KiB
"use strict";(self.webpackChunknoco_docs=self.webpackChunknoco_docs||[]).push([[9069],{3905:(e,n,o)=>{o.d(n,{Zo:()=>s,kt:()=>g});var a=o(67294);function t(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function r(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,a)}return o}function d(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}function c(e,n){if(null==e)return{};var o,a,t=function(e,n){if(null==e)return{};var o,a,t={},r=Object.keys(e);for(a=0;a<r.length;a++)o=r[a],n.indexOf(o)>=0||(t[o]=e[o]);return t}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)o=r[a],n.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}var l=a.createContext({}),i=function(e){var n=a.useContext(l),o=n;return e&&(o="function"==typeof e?e(n):d(d({},n),e)),o},s=function(e){var n=i(e.components);return a.createElement(l.Provider,{value:n},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},b=a.forwardRef((function(e,n){var o=e.components,t=e.mdxType,r=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),p=i(o),b=t,g=p["".concat(l,".").concat(b)]||p[b]||u[b]||r;return o?a.createElement(g,d(d({ref:n},s),{},{components:o})):a.createElement(g,d({ref:n},s))}));function g(e,n){var o=arguments,t=n&&n.mdxType;if("string"==typeof e||t){var r=o.length,d=new Array(r);d[0]=b;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[p]="string"==typeof e?e:t,d[1]=c;for(var i=2;i<r;i++)d[i]=o[i];return a.createElement.apply(null,d)}return a.createElement.apply(null,o)}b.displayName="MDXCreateElement"},89e3:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>i});var a=o(87462),t=(o(67294),o(3905));const r={title:"Upgrading",description:"Upgrading NocoDB : Docker, Node and Homebrew!",tags:["Open Source"],keywords:["NocoDB upgrade","upgrade NocoDB","upgrade nocodb"]},d=void 0,c={unversionedId:"getting-started/self-hosted/upgrading",id:"getting-started/self-hosted/upgrading",title:"Upgrading",description:"Upgrading NocoDB : Docker, Node and Homebrew!",source:"@site/docs/020.getting-started/050.self-hosted/030.upgrading.md",sourceDirName:"020.getting-started/050.self-hosted",slug:"/getting-started/self-hosted/upgrading",permalink:"/getting-started/self-hosted/upgrading",draft:!1,editUrl:"https://github.com/nocodb/nocodb/tree/develop/packages/noco-docs/docs/docs/020.getting-started/050.self-hosted/030.upgrading.md",tags:[{label:"Open Source",permalink:"/tags/open-source"}],version:"current",sidebarPosition:30,frontMatter:{title:"Upgrading",description:"Upgrading NocoDB : Docker, Node and Homebrew!",tags:["Open Source"],keywords:["NocoDB upgrade","upgrade NocoDB","upgrade nocodb"]},sidebar:"tutorialSidebar",previous:{title:"Environment variables",permalink:"/getting-started/self-hosted/environment-variables"},next:{title:"Workspace overview",permalink:"/workspaces/workspace-overview"}},l={},i=[{value:"Docker",id:"docker",level:2},{value:"Find, Stop & Delete NocoDB Docker Container",id:"find-stop--delete-nocodb-docker-container",level:3},{value:"Find & Remove NocoDB Docker Image",id:"find--remove-nocodb-docker-image",level:3},{value:"Pull the latest NocoDB image with same environment variables",id:"pull-the-latest-nocodb-image-with-same-environment-variables",level:3},{value:"Example: Docker Upgrade",id:"example-docker-upgrade",level:3},{value:"Node",id:"node",level:2},{value:"Uninstall NocoDB package",id:"uninstall-nocodb-package",level:4},{value:"Install NocoDB package",id:"install-nocodb-package",level:4},{value:"Homebrew",id:"homebrew",level:2}],s={toc:i},p="wrapper";function u(e){let{components:n,...o}=e;return(0,t.kt)(p,(0,a.Z)({},s,o,{components:n,mdxType:"MDXLayout"}),(0,t.kt)("p",null,"By default, if ",(0,t.kt)("inlineCode",{parentName:"p"},"NC_DB")," is not specified upon ",(0,t.kt)("a",{parentName:"p",href:"/getting-started/self-hosted/installation"},"installation"),", then SQLite will be used to store metadata. We suggest users to separate the metadata and user data in different databases as pictured in our ",(0,t.kt)("a",{parentName:"p",href:"/engineering/architecture"},"architecture"),". "),(0,t.kt)("h2",{id:"docker"},"Docker"),(0,t.kt)("h3",{id:"find-stop--delete-nocodb-docker-container"},"Find, Stop & Delete NocoDB Docker Container"),(0,t.kt)("pre",null,(0,t.kt)("code",{parentName:"pre",className:"language-bash"},"# find NocoDB container ID\ndocker ps\n# stop NocoDB container\ndocker stop <YOUR_CONTAINER_ID>\n# delete NocoDB container\ndocker rm <YOUR_CONTAINER_ID>\n")),(0,t.kt)("p",null,"Note: Deleting your docker container without setting ",(0,t.kt)("inlineCode",{parentName:"p"},"NC_DB")," or mounting to a persistent volume for a default SQLite database will result in losing your data. See examples below."),(0,t.kt)("h3",{id:"find--remove-nocodb-docker-image"},"Find & Remove NocoDB Docker Image"),(0,t.kt)("pre",null,(0,t.kt)("code",{parentName:"pre",className:"language-bash"},"# find NocoDB image\ndocker images\n# delete NocoDB image\ndocker rmi <YOUR_IMAGE_ID>\n")),(0,t.kt)("h3",{id:"pull-the-latest-nocodb-image-with-same-environment-variables"},"Pull the latest NocoDB image with same environment variables"),(0,t.kt)("pre",null,(0,t.kt)("code",{parentName:"pre",className:"language-bash"},'docker run -d -p 8080:8080 \\\n -e NC_DB="<YOUR_NC_DB_URL>" \\\n -e NC_AUTH_JWT_SECRET="<YOUR_NC_AUTH_JWT_SECRET_IF_GIVEN>" \\\n nocodb/nocodb:latest\n')),(0,t.kt)("p",null,"Updating NocoDB docker container is similar to updating ",(0,t.kt)("a",{parentName:"p",href:"https://www.whitesourcesoftware.com/free-developer-tools/blog/update-docker-images/"},"any other docker containers"),"."),(0,t.kt)("h3",{id:"example-docker-upgrade"},"Example: Docker Upgrade"),(0,t.kt)("pre",null,(0,t.kt)("code",{parentName:"pre",className:"language-bash"},'# Previous docker run\n#\nterminal % docker run -d --name myNocoDB \\\n-v "$(pwd)"/nocodb:/usr/app/data/ \\\n-p 8080:8080 \\\n-e NC_DB="pg://host.docker.internal:5432?u=postgres&p=password&d=d1" \\\n-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \\\nnocodb/nocodb:0.111.0\nUnable to find image \'nocodb/nocodb:0.111.0\' locally\n0.111.0: Pulling from nocodb/nocodb\nad3fa0ea069c: Pull complete \ne43b9156e769: Pull complete \nc1bee0da1504: Pull complete \nadf78ab024d9: Pull complete \ncd8000d2c16a: Pull complete \nDigest: sha256:93b6e1ba2c0b90a26b205f9c7d44053aa6d8fa037eff9eb4155ca017f6c9bed4\nStatus: Downloaded newer image for nocodb/nocodb:0.111.0\nafdc8edd1005c93e1df8f90d02e46430ea7b5c5610a2bf9ba105238d6c4d927b\n\n\n# Find, stop and delete NocoDB docker container\n#\nterminal % docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nafdc8edd1005 nocodb/nocodb:0.111.0 "/usr/bin/dumb-init \u2026" 18 seconds ago Up 18 seconds 0.0.0.0:8080->8080/tcp myNocoDB\n0202041b3607 postgres:14.7 "docker-entrypoint.s\u2026" 2 days ago Up 8 hours (healthy) 0.0.0.0:5432->5432/tcp scripts_pg147_1\n\nterminal % docker stop afdc8edd1005\nafdc8edd1005\n\nterminal % docker rm afdc8edd1005\nafdc8edd1005\n\n\n# Find and remove NocoDB docker image\n#\nterminal % docker images\nREPOSITORY TAG IMAGE ID CREATED SIZE\nnocodb/nocodb 0.111.0 34609411e87c 5 weeks ago 132MB\nmysql 8.0 6a0560a40914 7 weeks ago 599MB\npostgres 14.7 2075a95c7b3b 4 months ago 358MB\n\nterminal % docker rmi 34609411e87c\nUntagged: nocodb/nocodb:0.111.0\nUntagged: nocodb/nocodb@sha256:93b6e1ba2c0b90a26b205f9c7d44053aa6d8fa037eff9eb4155ca017f6c9bed4\nDeleted: sha256:3bfxxxx38e682742cbxxxx535b3503af45e931fb9bd15f46eca7d33cf4c54d72\nDeleted: sha256:952152b5da42ae057c6688a04xxxx72e1a2f91825956f5c7e35f91d5b285d4d8\nDeleted: sha256:3155197577xxxx673675ed1bce761714a24d7803f70a905740f7d4c248cxxxxx\n\n\n# Pull & run the latest NocoDB image with same environment variables as before\n#\nterminal % docker run -d --name myNocoDB \\\n-v "$(pwd)"/nocodb:/usr/app/data/ \\\n-p 8080:8080 \\\n-e NC_DB="pg://host.docker.internal:5432?u=postgres&p=password&d=d1" \\\n-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \\\nnocodb/nocodb:latest\nUnable to find image \'nocodb/nocodb:latest\' locally\nlatest: Pulling from nocodb/nocodb\nad3fa0ea069c: Pull complete \ne43b9156e769: Pull complete \nc1bee0da1504: Pull complete \nadf78ab024d9: Pull complete \n28ce4fc94e48: Pull complete \nDigest: sha256:5c6df5ff0eb1278e1dbfe684af630a743ca73dfec8c30cab3bae9c1d0d640287\nStatus: Downloaded newer image for nocodb/nocodb:latest\nae793a04b75f2f3ee78abbaef09891396a884ec83320151a266326195649a058\n\n\n')),(0,t.kt)("h2",{id:"node"},"Node"),(0,t.kt)("p",null,"Updating docker container is similar to updating a npm package."),(0,t.kt)("p",null,"From your root folder "),(0,t.kt)("h4",{id:"uninstall-nocodb-package"},"Uninstall NocoDB package"),(0,t.kt)("pre",null,(0,t.kt)("code",{parentName:"pre",className:"language-bash"},"npm uninstall nocodb\n")),(0,t.kt)("h4",{id:"install-nocodb-package"},"Install NocoDB package"),(0,t.kt)("pre",null,(0,t.kt)("code",{parentName:"pre",className:"language-bash"},"npm install --save nocodb\n")),(0,t.kt)("h2",{id:"homebrew"},"Homebrew"),(0,t.kt)("p",null,"Run following commands to upgrade Homebrew Nocodb version."),(0,t.kt)("pre",null,(0,t.kt)("code",{parentName:"pre",className:"language-bash"},"# Update the local homebrew formulas\nbrew update\n# Upgrade nocodb package\nbrew upgrade nocodb\n")))}u.isMDXComponent=!0}}]); |