Skip to content

Commit 52e11f6

Browse files
stb13579meganelachenyderrickmehaffygpenepwizla
authored
Remove TypeScript code snippets from DigitalOcean deployment guide (#940)
* Logo customization via admin panel (#855) * Write custom logo documentation in user guide * Add new icons * Fix custom logo explanations + add note in dev docs * Fix typos and improve phrasing * Improve callouts * Add precisions in callout * Add screenshot * Improve documentation after reviews * Update screenshot * minor cleanups and rewriting middleware documentation with examples (#912) * minor cleanups and rewriting middleware documentation Signed-off-by: Derrick Mehaffy <[email protected]> * finish all the middlewares * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Gabriel <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md Co-authored-by: Pierre Wizla <[email protected]> * Slightly reword code comment * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * Update docs/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.md * more cleanup * Update wording Co-authored-by: Gabriel <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> * Digital Ocean app platform deployment guide (#857) * Created new Digital Ocean App Platform deployment guide * Rough outline for deploying on DO-AP * fix top matter * Add server.js/ts and database.js/ts min config snippets * Add postgres dependencies commands & rough DO directions * Added DO config steps * fixed text in callout * fix code snippets and delint * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digital-ocean-app-platform-2022.md Co-authored-by: DMehaffy <[email protected]> * added text for server config and GitHub quickstart link * add GitHub quickstart link and server.js config details * Corrected Digital Ocean to DigitalOcean * Fixed spelling and delint + changed file name * rebase * fix database name * Fixed the first section * change environment variable heading title and clean up section * cleanup caps * change heading level * fixed file path and added server config intro * add pg package link * fixed code blocks * add formatting to App access link * delint * fixed spelling and punctuation * fixed misc formatting * revised deployment section * cleaned up code blocks + misc formatting * fix code typo * fixed code block formatting * improve text * revised intro * code cleanup * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform-2022.md Co-authored-by: meganelacheny <[email protected]> * Change file name and misc fixes * remove alt file name * delete draft file * added space for "// path" * fixed various things * Rewrite the Strapi project section * fixed the managed database deployment directions * fixed typo * remove text * changed table format * cleaned up text * fixed misc small issues * Edited the managed database section * small wording fix * add link to env table * change casing * small fixes * clarify the saving changes step * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md Co-authored-by: DMehaffy <[email protected]> * Update docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md Co-authored-by: DMehaffy <[email protected]> * Update environment variables directions Co-authored-by: DMehaffy <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> Co-authored-by: meganelacheny <[email protected]> * Updates plugins user guide for marketplace providers (#923) * update plugins user guide for marketplace providers * Incorporate feedback * Update installing-plugins-via-marketplace.md * update screenshots * fix typo * crop image * Fix broken links * Update marketplace screenshot * Drop v12 support (#928) * Drop v12 support (>=14.19.1 <=16.x.x) * Update node version in FAQ * Keep v14 as most recommended * Moved middleware list into a table with installed vs required (#936) * Moved middleware list into a table with installed vs required * pr feedback * revert to piwi's vs code extension for tables Co-authored-by: Pierre Wizla <[email protected]> * Add callout about templates being reworked (#938) * Update again node version in telemetry docs * Update templates callout title * Remove TypeScript code snippets from DigitalOcean deployment guide * remove additional typescript refs Co-authored-by: meganelacheny <[email protected]> Co-authored-by: DMehaffy <[email protected]> Co-authored-by: Gabriel <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> Co-authored-by: Pierre Wizla <[email protected]>
1 parent 8eb2088 commit 52e11f6

File tree

1 file changed

+2
-94
lines changed

1 file changed

+2
-94
lines changed

docs/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/digitalocean-app-platform.md

Lines changed: 2 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@ Prior to starting the deployment process each user needs:
2525
Strapi uses [environment configurations](/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.md) to maintain multiple environments inside a single application. This section describes how to setup a production environment in a Strapi application.
2626

2727
1. Add a production configuration environment by creating a sub-directory `./config/env/production`.
28-
2. Create `database.js` (or `database.ts` for TypeScript projects) inside the `./config/env/production` directory.
28+
2. Create `database.js` inside the `./config/env/production` directory.
2929
3. Add the code snippet to the `database` configuration file:
3030

31-
<code-group>
32-
33-
<code-block title='JAVASCRIPT'>
34-
3531
```jsx
3632
// path: ./config/env/production/database.js
3733

@@ -54,41 +50,9 @@ Strapi uses [environment configurations](/developer-docs/latest/setup-deployment
5450

5551
```
5652

57-
</code-block>
58-
59-
<code-block title='TYPESCRIPT'>
60-
61-
```jsx
62-
// path: ./config/env/production/database.ts
63-
64-
export default ({ env }) => ({
65-
connection: {
66-
client: 'postgres',
67-
connection: {
68-
host: env('DATABASE_HOST'),
69-
port: env.int('DATABASE_PORT'),
70-
database: env('DATABASE_NAME'),
71-
user: env('DATABASE_USERNAME'),
72-
password: env('DATABASE_PASSWORD'),
73-
ssl: {
74-
rejectUnauthorized:env.bool('DATABASE_SSL_SELF', false),
75-
},
76-
},
77-
debug: false,
78-
},
79-
});
80-
```
81-
82-
</code-block>
83-
</code-group>
84-
85-
4. Create `server.js` (or `server.ts` for TypeScript projects) inside the `./config/env/production` directory.
53+
4. Create `server.js` inside the `./config/env/production` directory.
8654
5. Add the code snippet to the `server` configuration file:
8755

88-
<code-group>
89-
90-
<code-block title='JAVASCRIPT'>
91-
9256
```jsx
9357
// path: ./config/env/production/server.js
9458
@@ -101,25 +65,6 @@ Strapi uses [environment configurations](/developer-docs/latest/setup-deployment
10165
});
10266
```
10367

104-
</code-block>
105-
106-
<code-block title='TYPESCRIPT'>
107-
108-
```jsx
109-
// path: ./config/env/production/server.ts
110-
111-
export default ({ env }) => ({
112-
proxy: true,
113-
url: env('APP_URL'), // replaces `host` and `port` properties in the development environment
114-
app: {
115-
keys: env.array('APP_KEYS')
116-
},
117-
});
118-
```
119-
120-
</code-block>
121-
</code-group>
122-
12368
6. Add PostgreSQL dependencies by installing [`pg` package](https://www.npmjs.com/package/pg):
12469

12570
<code-group>
@@ -248,10 +193,6 @@ yarn add pg-connection-string
248193

249194
To switch to a managed database modify the `config/env/production/database` file to be able to parse the `DATABASE_URL`:
250195

251-
<code-group>
252-
253-
<code-block title='JAVASCRIPT'>
254-
255196
```jsx
256197
// path: ./config/env/production/database.js
257198

@@ -278,39 +219,6 @@ module.exports = ({ env }) => ({
278219

279220
```
280221
281-
</code-block>
282-
283-
<code-block title='TYPESCRIPT'>
284-
285-
```jsx
286-
// path: ./config/env/production/database.ts
287-
288-
const parse = require("pg-connection-string").parse;
289-
290-
const { host, port, database, user, password } = parse(
291-
process.env.DATABASE_URL
292-
);
293-
294-
export default ({ env }) => ({
295-
client: 'postgres',
296-
connection: {
297-
host,
298-
port,
299-
database,
300-
user,
301-
password,
302-
ssl: {
303-
rejectUnauthorized: false,
304-
},
305-
debug: false,
306-
},
307-
});
308-
309-
```
310-
311-
</code-block>
312-
</code-group>
313-
314222
### Create a managed database on DigitalOcean
315223
316224
Changing the settings on the DigitalOcean App Platform to incorporate a managed database requires creating and attaching the database to an existing Strapi application. Additionally, the database environment variables must be removed, as managed databases propagate the connection properties automatically.

0 commit comments

Comments
 (0)