import{r,p as d,q as l,w as a,z as e,t as n,R as t}from"./vendor.3d5b4206.js";const u={class:"markdown-body"},h=e("h2",{id:"1.-setup-a-repo-on-github"},[t("1. Setup a repo on GitHub "),e("a",{class:"header-anchor",href:"#1.-setup-a-repo-on-github"},"#")],-1),p=t("See the doc on "),_=t("installing Directus manually"),f=t(" to learn how to configure this repo."),m=e("h2",{id:"2.-sign-up-for-a-digitalocean-account"},[t("2. Sign up for a DigitalOcean account "),e("a",{class:"header-anchor",href:"#2.-sign-up-for-a-digitalocean-account"},"#")],-1),g=e("p",null,[t("Create your DigitalOcean account \u2014 "),e("a",{href:"https://m.do.co/c/4c0b6062c16e",target:"_blank",rel:"noopener noreferrer"},"get $100 of free credit"),t(" by using our referral link.")],-1),b=e("h2",{id:"3.-create-a-managed-database-instance"},[t("3. Create a Managed Database instance "),e("a",{class:"header-anchor",href:"#3.-create-a-managed-database-instance"},"#")],-1),v=e("p",null,"We recommend using Postgres 12. The exact size and need for a replica depends on your usage and project requirements.",-1),y=e("h2",{id:"4.-create-a-new-app-using-your-previously-created-repo"},[t("4. Create a new App using your previously created repo "),e("a",{class:"header-anchor",href:"#4.-create-a-new-app-using-your-previously-created-repo"},"#")],-1),w=e("p",null,"Make sure to select the database you created in step 2 during the configuration wizard.",-1),D=e("h2",{id:"5.-setup-the-build-step"},[t("5. Setup the build-step "),e("a",{class:"header-anchor",href:"#5.-setup-the-build-step"},"#")],-1),S=t("While Directus itself doesn\u2019t have to be built from source in order to use it on App Platform, we do recommend adding "),C=e("code",null,"npx directus bootstrap",-1),k=t(" as the \u201Cbuild\u201D step for DigitalOcean. This will automatically provision the database if it\u2019s empty, and migrate it to the latest version in case of upgrades. See "),x=t("Command Line Interface"),O=t(" for more information."),T=e("h2",{id:"6.-configure-the-environment-variables"},[t("6. Configure the environment variables "),e("a",{class:"header-anchor",href:"#6.-configure-the-environment-variables"},"#")],-1),A=t("See "),E=t("Environment Variables"),B=t(" for all available environment variables."),L=e("p",null,"DigitalOcean requires you to use SSL connections to managed databases. DigitalOcean provides a bunch of aliases to often used database properties that can be injected when the database is a component of your app. To enable SSL connections, set the following environment variables:",-1),N=e("pre",null,[e("code",null,`DB_SSL__REJECT_UNAUTHORIZED=true
DB_SSL__CA=\${my-database-component-name.CA_CERT}
`)],-1),R=e("div",{class:"warning hint"},[e("p",null,[t("Make sure to replace "),e("code",null,"my-database-component-name"),t(" with your actual database component name in the above env vars")])],-1),z={setup(V,{expose:i}){const s={title:"DigitalOcean App Platform",modularExtension:!1};return i({frontmatter:s}),(W,j)=>{const o=r("router-link"),c=r("DocsWrapper");return d(),l(c,{frontmatter:s},{default:a(()=>[e("div",u,[h,e("p",null,[p,n(o,{to:"/docs/getting-started/installation/manual/"},{default:a(()=>[_]),_:1}),f]),m,g,b,v,y,w,D,e("p",null,[S,C,k,n(o,{to:"/docs/getting-started/installation/cli/"},{default:a(()=>[x]),_:1}),O]),T,e("p",null,[A,n(o,{to:"/docs/configuration/config-options/#general"},{default:a(()=>[E]),_:1}),B]),L,N,R])]),_:1})}}};export{z as default};
