diff --git a/org-cyf/content/guides/deployment-render/_index.md b/org-cyf/content/guides/deployment/render/_index.md
similarity index 80%
rename from org-cyf/content/guides/deployment-render/_index.md
rename to org-cyf/content/guides/deployment/render/_index.md
index 97e31673e..a6b4316da 100644
--- a/org-cyf/content/guides/deployment-render/_index.md
+++ b/org-cyf/content/guides/deployment/render/_index.md
@@ -2,12 +2,13 @@
emoji: 🚀
title: Deploying to Render
description: Learn how to deploy your website to Render.
+weight: 7
---
In this guide, we'll learn how to set up automatic website deployment to [Render](https://render.com/).
{{}}
-This guide is intended for trainees completing the Node, Databases or Final Projects. If you have not reached this part of the course yet, please use the [Netlify Deployment guide](../deployment-netlify/index.md) instead.
+This guide is intended for trainees completing the Node, Databases or Final Projects. If you have not reached this part of the course yet, please use the [Netlify Deployment guide](../netlify) instead.
{{}}
diff --git a/org-cyf/content/guides/deployment/render/connecting-a-dbms/changing-environment-variables.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/changing-environment-variables.png
new file mode 100644
index 000000000..c87ecfaa6
Binary files /dev/null and b/org-cyf/content/guides/deployment/render/connecting-a-dbms/changing-environment-variables.png differ
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/connection-error.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/connection-error.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/connection-error.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/connection-error.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/connection-successful.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/connection-successful.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/connection-successful.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/connection-successful.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/connection-test.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/connection-test.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/connection-test.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/connection-test.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/db-credentials.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/db-credentials.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/db-credentials.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/db-credentials.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/db-drivers.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/db-drivers.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/db-drivers.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/db-drivers.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/index.md b/org-cyf/content/guides/deployment/render/connecting-a-dbms/index.md
similarity index 67%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/index.md
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/index.md
index 1c7567cc2..c4044108e 100644
--- a/org-cyf/content/guides/deployment-render/connecting-a-dbms/index.md
+++ b/org-cyf/content/guides/deployment/render/connecting-a-dbms/index.md
@@ -2,6 +2,7 @@
title: client > database
description: Connecting a client to a database on Render
emoji: 🔌
+weight: 4
---
{{}}
@@ -54,28 +55,41 @@ This guide uses a database client called [DBeaver](https://dbeaver.io/), but the
# Connecting via node.js
We learnt in the Databases module to use the `pg` library to connect to a local Postgres database.
To connect via render we require an extra flag `ssl: { rejectUnauthorized: false }`, like so:
+
```javascript
+const connectionString = "postgres://jz:someverysecretpassword@dpg-ck107k7dorps738bnga0-a.frankfurt-postgres.render.com/fullstack_3qby";
+
const db = new Pool({
- user: "jz",
- host: "dpg-ck107k7dorps738bnga0-a.frankfurt-postgres.render.com",
- database: "fullstack_3qby",
- password: "NLNXAWPsYPzOn3kKzExavV08DugCC0rx",
+ connectionString: connectionString,
ssl: {
rejectUnauthorized: false,
},
});
```
-Note that the `host` does not exactly match what is shown on the render.com dashboard - you should use the information in `External Database URL` to connect from your own computer:
+When connecting to Render's database from your local machine you should use the information in `External Database URL`:
![render.com dashboard connections](render-dashboard.png)
-However, if you are running your client on render alongside your server, then you will be able to use the `Internal Database URL` instead. In this case, the `host` will indeed match.
-You can also directly copy the url into a `connectionString` and it should work in the same way:
-```javascript
-const db = new Pool({
- connectionString: "postgres://jz:NLNXAWPsYPzOn3kKzExavV08DugCC0rx@dpg-ck107k7dorps738bnga0-a.frankfurt-postgres.render.com/fullstack_3qby",
- ssl: {
- rejectUnauthorized: false,
- },
-});
+However, if you are running your client on render alongside your server, then you will be able to use the `Internal Database URL` instead.
+
+Note that when committing code to GitHub you should avoid adding any kind of secrets. The `connectionString` above for example contains your database password, and anyone knowing that information will be able to access your database directly.
+
+To avoid this you should set up these values using environment variables. First in your code change the following:
+
+```js
+const connectionString = process.env.DATABASE_URL;
```
+
+Then go to your project's configuration in Render, and set up the `DATABASE_URL` environment variable:
+
+![render.com environment settings](changing-environment-variables.png)
+
+Make sure you use the `Internal Database URL` setting. This will let Render know what the database's location is.
+
+To set this value locally you can use the following code:
+
+```bash
+export DATABASE_URL=
+```
+
+Note this will only set up this value for the current session. Every time you reload your terminal you will need to re-do this call. To avoid needing to do this all the time, you can opt in using a project called [Dotenv](https://github.com/motdotla/dotenv)
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/new-connection.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/new-connection.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/new-connection.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/new-connection.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/render-dashboard.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/render-dashboard.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/render-dashboard.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/render-dashboard.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/selecting-postgres.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/selecting-postgres.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/selecting-postgres.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/selecting-postgres.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-a-dbms/show-all-databases.png b/org-cyf/content/guides/deployment/render/connecting-a-dbms/show-all-databases.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-a-dbms/show-all-databases.png
rename to org-cyf/content/guides/deployment/render/connecting-a-dbms/show-all-databases.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-github/index.md b/org-cyf/content/guides/deployment/render/connecting-github/index.md
similarity index 98%
rename from org-cyf/content/guides/deployment-render/connecting-github/index.md
rename to org-cyf/content/guides/deployment/render/connecting-github/index.md
index 74a1107f9..15e86fa88 100644
--- a/org-cyf/content/guides/deployment-render/connecting-github/index.md
+++ b/org-cyf/content/guides/deployment/render/connecting-github/index.md
@@ -2,6 +2,7 @@
title: GitHub > Render
description: How to connect your GitHub to Render
emoji: 🔌
+weight: 1
---
1. Click SIGN IN button
diff --git a/org-cyf/content/guides/deployment-render/connecting-github/sign-in-with-github.png b/org-cyf/content/guides/deployment/render/connecting-github/sign-in-with-github.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-github/sign-in-with-github.png
rename to org-cyf/content/guides/deployment/render/connecting-github/sign-in-with-github.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-github/sign-in.png b/org-cyf/content/guides/deployment/render/connecting-github/sign-in.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-github/sign-in.png
rename to org-cyf/content/guides/deployment/render/connecting-github/sign-in.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-github/sign-up-complete.png b/org-cyf/content/guides/deployment/render/connecting-github/sign-up-complete.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-github/sign-up-complete.png
rename to org-cyf/content/guides/deployment/render/connecting-github/sign-up-complete.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-github/verification-email-link.png b/org-cyf/content/guides/deployment/render/connecting-github/verification-email-link.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-github/verification-email-link.png
rename to org-cyf/content/guides/deployment/render/connecting-github/verification-email-link.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-github/verification-email-received.png b/org-cyf/content/guides/deployment/render/connecting-github/verification-email-received.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-github/verification-email-received.png
rename to org-cyf/content/guides/deployment/render/connecting-github/verification-email-received.png
diff --git a/org-cyf/content/guides/deployment-render/connecting-github/verification-email-sent.png b/org-cyf/content/guides/deployment/render/connecting-github/verification-email-sent.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/connecting-github/verification-email-sent.png
rename to org-cyf/content/guides/deployment/render/connecting-github/verification-email-sent.png
diff --git a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/connect-button.png b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/connect-button.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/creating-a-postgres-db/connect-button.png
rename to org-cyf/content/guides/deployment/render/creating-a-postgres-db/connect-button.png
diff --git a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/database-active.png b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/database-active.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/creating-a-postgres-db/database-active.png
rename to org-cyf/content/guides/deployment/render/creating-a-postgres-db/database-active.png
diff --git a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/database-creating.png b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/database-creating.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/creating-a-postgres-db/database-creating.png
rename to org-cyf/content/guides/deployment/render/creating-a-postgres-db/database-creating.png
diff --git a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/database-name.png b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/database-name.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/creating-a-postgres-db/database-name.png
rename to org-cyf/content/guides/deployment/render/creating-a-postgres-db/database-name.png
diff --git a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/environment-variables.png b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/environment-variables.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/creating-a-postgres-db/environment-variables.png
rename to org-cyf/content/guides/deployment/render/creating-a-postgres-db/environment-variables.png
diff --git a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/free-plan-and-create-database.png b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/free-plan-and-create-database.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/creating-a-postgres-db/free-plan-and-create-database.png
rename to org-cyf/content/guides/deployment/render/creating-a-postgres-db/free-plan-and-create-database.png
diff --git a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/index.md b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/index.md
similarity index 83%
rename from org-cyf/content/guides/deployment-render/creating-a-postgres-db/index.md
rename to org-cyf/content/guides/deployment/render/creating-a-postgres-db/index.md
index 2a78c5ae5..1a3d4fca7 100644
--- a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/index.md
+++ b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/index.md
@@ -2,6 +2,7 @@
title: PostgreSQL > Render
description: How to create a PostgreSQL Database on Render
emoji: 🐘
+weight: 3
---
1. Click on the New + button, then click on PostgreSQL
@@ -28,6 +29,8 @@ emoji: 🐘
![Environment variables in the Connections tab](environment-variables.png)
-7. The Connect button could be useful for quick Environment Variable reference
+7. If you are using a Render database outside of Render, you'll need to use the External Database URL. If you are using the database inside of Render, you should use the Internal Database URL.
+
+8. The Connect button could be useful for quick Environment Variable reference
![Connect button showing quick reference to environment variables](connect-button.png)
diff --git a/org-cyf/content/guides/deployment-render/creating-a-postgres-db/new-postgres.png b/org-cyf/content/guides/deployment/render/creating-a-postgres-db/new-postgres.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/creating-a-postgres-db/new-postgres.png
rename to org-cyf/content/guides/deployment/render/creating-a-postgres-db/new-postgres.png
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/authorise-render.png b/org-cyf/content/guides/deployment/render/deploying-server/authorise-render.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/authorise-render.png
rename to org-cyf/content/guides/deployment/render/deploying-server/authorise-render.png
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/build-successful.jpg b/org-cyf/content/guides/deployment/render/deploying-server/build-successful.jpg
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/build-successful.jpg
rename to org-cyf/content/guides/deployment/render/deploying-server/build-successful.jpg
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/complete-sign-up.png b/org-cyf/content/guides/deployment/render/deploying-server/complete-sign-up.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/complete-sign-up.png
rename to org-cyf/content/guides/deployment/render/deploying-server/complete-sign-up.png
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/connect-repo.jpg b/org-cyf/content/guides/deployment/render/deploying-server/connect-repo.jpg
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/connect-repo.jpg
rename to org-cyf/content/guides/deployment/render/deploying-server/connect-repo.jpg
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/create-web-service.jpg b/org-cyf/content/guides/deployment/render/deploying-server/create-web-service.jpg
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/create-web-service.jpg
rename to org-cyf/content/guides/deployment/render/deploying-server/create-web-service.jpg
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/dashboard-new-button.png b/org-cyf/content/guides/deployment/render/deploying-server/dashboard-new-button.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/dashboard-new-button.png
rename to org-cyf/content/guides/deployment/render/deploying-server/dashboard-new-button.png
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/index.md b/org-cyf/content/guides/deployment/render/deploying-server/index.md
similarity index 99%
rename from org-cyf/content/guides/deployment-render/deploying-server/index.md
rename to org-cyf/content/guides/deployment/render/deploying-server/index.md
index 7c5912762..d2bde3ab6 100644
--- a/org-cyf/content/guides/deployment-render/deploying-server/index.md
+++ b/org-cyf/content/guides/deployment/render/deploying-server/index.md
@@ -2,6 +2,7 @@
title: Deploy a server
description: How to deploy a server on Render
emoji: 🍦
+weight: 2
---
1. Make sure you have connected your GitHub account to Render (see [How to connect your GitHub to Render](connecting-github.md))
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/name-web-service.jpg b/org-cyf/content/guides/deployment/render/deploying-server/name-web-service.jpg
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/name-web-service.jpg
rename to org-cyf/content/guides/deployment/render/deploying-server/name-web-service.jpg
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/new-web-service.jpg b/org-cyf/content/guides/deployment/render/deploying-server/new-web-service.jpg
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/new-web-service.jpg
rename to org-cyf/content/guides/deployment/render/deploying-server/new-web-service.jpg
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/render-dashboard.png b/org-cyf/content/guides/deployment/render/deploying-server/render-dashboard.png
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/render-dashboard.png
rename to org-cyf/content/guides/deployment/render/deploying-server/render-dashboard.png
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/start-command.jpg b/org-cyf/content/guides/deployment/render/deploying-server/start-command.jpg
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/start-command.jpg
rename to org-cyf/content/guides/deployment/render/deploying-server/start-command.jpg
diff --git a/org-cyf/content/guides/deployment-render/deploying-server/url-to-deployed-web-service.jpg b/org-cyf/content/guides/deployment/render/deploying-server/url-to-deployed-web-service.jpg
similarity index 100%
rename from org-cyf/content/guides/deployment-render/deploying-server/url-to-deployed-web-service.jpg
rename to org-cyf/content/guides/deployment/render/deploying-server/url-to-deployed-web-service.jpg
diff --git a/org-cyf/content/guides/deployment/render/serving-frontend-through-backend.md b/org-cyf/content/guides/deployment/render/serving-frontend-through-backend.md
new file mode 100644
index 000000000..22a0231b4
--- /dev/null
+++ b/org-cyf/content/guides/deployment/render/serving-frontend-through-backend.md
@@ -0,0 +1,8 @@
+---
+title: Serving frontend through backend
+description: Serving frontend through backend
+emoji: 🖥️
+weight: 5
+---
+
+Render support frontend deployments either via their CDN, or by changing your backend code to support serving frontend files. If you wish CDN style deployment we suggest you use Netlify instead. For a guide on how to update your backend to support serving frontend files please read [the Fly.io frontend guide](../flyio/serving-frontend) guide.