# Problems integrating ForestAdmin with Google Cloud (appEngine and Postgres SQL)

**URL:** <https://community.forestadmin.com/t/problems-integrating-forestadmin-with-google-cloud-appengine-and-postgres-sql/3021>\
**Category:** Help me!\
**Tags:** setup\
**Created:** [July 30, 2021, 12:01pm UTC](https://community.forestadmin.com/t/problems-integrating-forestadmin-with-google-cloud-appengine-and-postgres-sql/3021 "2021-07-30T12:01:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flavio\_Alves](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/flavio_alves/32/2798_2.png) [@Flavio\_Alves](https://community.forestadmin.com/u/Flavio_Alves)\
**Post date:** [July 30, 2021, 12:01pm UTC](https://community.forestadmin.com/t/problems-integrating-forestadmin-with-google-cloud-appengine-and-postgres-sql/3021/1 "2021-07-30T12:01:45Z")

</div>

Hello,

I installed a Postgres SQL database on Google Cloud SQL and I intend to access it from ForestAdmin.

Following the instructions from the [ForestAdmin guide](https://docs.forestadmin.com/documentation/how-tos/setup/deploy-your-admin-backend-with-google-cloud-platform), I could see the database content on ForestAdmin in **development environment**.

The ForestAdmin backend was running locally.

My next step was to install the ForestAdmin backend on Google AppEngine, to have an automate solution. I continued following the guide, including the adjustments provided by the [environment section](https://docs.forestadmin.com/documentation/reference-guide/how-it-works/environments#deploying-to-production) of ForestAdmin documentation.

During the setup of the new enviroment on ForestAdmin system I could get the information to be updated in the backend.

I replaced the environmental information and ran again **gcloud app deploy**. And continued the operations on ForestAdmin system.

On the new environment, I cannot see the data. Here is the screen that I have after a page reload:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/f/fe5d6922d884a2cb9034a3432cdd0753fce999e9.png)

And after some time, I have this image:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/3/3790d2ca7b87db3a030e11a3e28214ce8906fc48.png)

Below we have the content of my configuration file in admin backend deployed in Google Cloud:

```javascript
runtime: nodejs12
env_variables:
   FOREST_ENV_SECRET: 'xxxx'
   FOREST_AUTH_SECRET: 'yyyy'
   NODE_ENV: 'production'
   DATABASE_URL: 'postgres://xxxxxx'
   APPLICATION_URL: 'xxxxxx'

```

Here the configuration screen in ForestAdmin project:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/4/4ee1e1524e248a86c1262a373c0945fc0116427f.png)

And, finally, the log messages from Google Cloud for the app:

```javascript
2021-07-30 11:50:11 default[20210729t185736] "GET /forest/installationInstallation?timezone=America%2FSao_Paulo&fields%5BinstallationInstallation%5D=id%2CinstallationDate%2Cmanufacturer%2CqcResult%2CserialNumber&fields%5Bmanufacturer%5D=name&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id HTTP/1.1" 500
2021-07-30 11:50:12 default[20210729t185736] "GET /forest/installationInstallation/count?fields%5BinstallationInstallation%5D=id%2CinstallationDate%2Cmanufacturer%2CqcResult%2CserialNumber&fields%5Bmanufacturer%5D=name&searchExtended=0&timezone=America%2FSao_Paulo HTTP/1.1" 500
2021-07-30 11:52:19 default[20210729t185736] [forest] 🌳🌳🌳 Unexpected error: connect ETIMEDOUT 34.72.218.162:5432
2021-07-30 11:52:19 default[20210729t185736] {
2021-07-30 11:52:19 default[20210729t185736] "name": "SequelizeConnectionError",
2021-07-30 11:52:19 default[20210729t185736] "parent": {
2021-07-30 11:52:19 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:52:19 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:52:19 default[20210729t185736] "syscall": "connect",
2021-07-30 11:52:19 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:52:19 default[20210729t185736] "port": 5432
2021-07-30 11:52:19 default[20210729t185736] },
2021-07-30 11:52:19 default[20210729t185736] "original": {
2021-07-30 11:52:19 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:52:19 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:52:19 default[20210729t185736] "syscall": "connect",
2021-07-30 11:52:19 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:52:19 default[20210729t185736] "port": 5432
2021-07-30 11:52:19 default[20210729t185736] },
2021-07-30 11:52:19 default[20210729t185736] "stack": "SequelizeConnectionError: connect ETIMEDOUT 34.72.218.162:5432\n at /workspace/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24\n at Connection.connectingErrorHandler (/workspace/node_modules/pg/lib/client.js:213:14)\n at Connection.emit (events.js:314:20)\n at Socket.reportStreamError (/workspace/node_modules/pg/lib/connection.js:57:10)\n at Socket.emit (events.js:314:20)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)"
2021-07-30 11:52:19 default[20210729t185736] }
2021-07-30 11:52:19 default[20210729t185736] [forest] 🌳🌳🌳 Unexpected error: connect ETIMEDOUT 34.72.218.162:5432
2021-07-30 11:52:19 default[20210729t185736] {
2021-07-30 11:52:19 default[20210729t185736] "name": "SequelizeConnectionError",
2021-07-30 11:52:19 default[20210729t185736] "parent": {
2021-07-30 11:52:19 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:52:19 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:52:19 default[20210729t185736] "syscall": "connect",
2021-07-30 11:52:19 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:52:19 default[20210729t185736] "port": 5432
2021-07-30 11:52:19 default[20210729t185736] },
2021-07-30 11:52:19 default[20210729t185736] "original": {
2021-07-30 11:52:19 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:52:19 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:52:19 default[20210729t185736] "syscall": "connect",
2021-07-30 11:52:19 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:52:19 default[20210729t185736] "port": 5432
2021-07-30 11:52:19 default[20210729t185736] },
2021-07-30 11:52:19 default[20210729t185736] "stack": "SequelizeConnectionError: connect ETIMEDOUT 34.72.218.162:5432\n at /workspace/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24\n at Connection.connectingErrorHandler (/workspace/node_modules/pg/lib/client.js:213:14)\n at Connection.emit (events.js:314:20)\n at Socket.reportStreamError (/workspace/node_modules/pg/lib/connection.js:57:10)\n at Socket.emit (events.js:314:20)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)"
2021-07-30 11:52:19 default[20210729t185736] }
2021-07-30 11:52:19 default[20210729t185736] GET /forest/installationInstallation/count?fields%5BinstallationInstallation%5D=id%2CinstallationDate%2Cmanufacturer%2CqcResult%2CserialNumber&fields%5Bmanufacturer%5D=name&searchExtended=0&timezone=America%2FSao_Paulo 500 109 - 126782.337 ms
2021-07-30 11:52:19 default[20210729t185736] GET /forest/installationInstallation?timezone=America%2FSao_Paulo&fields%5BinstallationInstallation%5D=id%2CinstallationDate%2Cmanufacturer%2CqcResult%2CserialNumber&fields%5Bmanufacturer%5D=name&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id 500 109 - 127775.669 ms
2021-07-30 11:53:28 default[20210729t185736] "POST /forest/authentication HTTP/1.1" 200
2021-07-30 11:53:28 default[20210729t185736] POST /forest/authentication 200 1094 - 2.231 ms
2021-07-30 11:53:28 default[20210729t185736] "OPTIONS /forest/authentication/callback?code=hHGqDLtMWJ1C5AQ1HmgPmwrZtxZ-E3RKCqssRu8e2V2eU2dwUzljxMYzSKXyDxp7&state=%7B%22renderingId%22%3A97429%7D HTTP/1.1" 204
2021-07-30 11:53:28 default[20210729t185736] OPTIONS /forest/authentication/callback?code=hHGqDLtMWJ1C5AQ1HmgPmwrZtxZ-E3RKCqssRu8e2V2eU2dwUzljxMYzSKXyDxp7&state=%7B%22renderingId%22%3A97429%7D 204 0 - 0.211 ms
2021-07-30 11:53:29 default[20210729t185736] "GET /forest/authentication/callback?code=hHGqDLtMWJ1C5AQ1HmgPmwrZtxZ-E3RKCqssRu8e2V2eU2dwUzljxMYzSKXyDxp7&state=%7B%22renderingId%22%3A97429%7D HTTP/1.1" 200
2021-07-30 11:53:29 default[20210729t185736] GET /forest/authentication/callback?code=hHGqDLtMWJ1C5AQ1HmgPmwrZtxZ-E3RKCqssRu8e2V2eU2dwUzljxMYzSKXyDxp7&state=%7B%22renderingId%22%3A97429%7D 200 519 - 717.265 ms
2021-07-30 11:53:40 default[20210729t185736] "POST /forest/authentication HTTP/1.1" 200
2021-07-30 11:53:40 default[20210729t185736] POST /forest/authentication 200 1094 - 1.597 ms
2021-07-30 11:53:40 default[20210729t185736] "OPTIONS /forest/authentication/callback?code=j-HwyO0WsPGwD9Cs7SvvUWBdvxKV43ZXuVLRPCT9kMN_U0EUw3o9Rw-moHhcRq-w&state=%7B%22renderingId%22%3A97429%7D HTTP/1.1" 204
2021-07-30 11:53:40 default[20210729t185736] OPTIONS /forest/authentication/callback?code=j-HwyO0WsPGwD9Cs7SvvUWBdvxKV43ZXuVLRPCT9kMN_U0EUw3o9Rw-moHhcRq-w&state=%7B%22renderingId%22%3A97429%7D 204 0 - 0.218 ms
2021-07-30 11:53:40 default[20210729t185736] "GET /forest/authentication/callback?code=j-HwyO0WsPGwD9Cs7SvvUWBdvxKV43ZXuVLRPCT9kMN_U0EUw3o9Rw-moHhcRq-w&state=%7B%22renderingId%22%3A97429%7D HTTP/1.1" 200
2021-07-30 11:53:41 default[20210729t185736] GET /forest/authentication/callback?code=j-HwyO0WsPGwD9Cs7SvvUWBdvxKV43ZXuVLRPCT9kMN_U0EUw3o9Rw-moHhcRq-w&state=%7B%22renderingId%22%3A97429%7D 200 519 - 714.294 ms
2021-07-30 11:53:41 default[20210729t185736] "GET /forest/authGroup?timezone=America%2FSao_Paulo&fields%5BauthGroup%5D=id%2Cname&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id HTTP/1.1" 500
2021-07-30 11:53:41 default[20210729t185736] "GET /forest/authGroup/count?fields%5BauthGroup%5D=id%2Cname&searchExtended=0&timezone=America%2FSao_Paulo HTTP/1.1" 500
2021-07-30 11:55:37 default[20210729t185736] [forest] 🌳🌳🌳 Unexpected error: connect ETIMEDOUT 34.72.218.162:5432
2021-07-30 11:55:37 default[20210729t185736] {
2021-07-30 11:55:37 default[20210729t185736] "name": "SequelizeConnectionError",
2021-07-30 11:55:37 default[20210729t185736] "parent": {
2021-07-30 11:55:37 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "syscall": "connect",
2021-07-30 11:55:37 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:55:37 default[20210729t185736] "port": 5432
2021-07-30 11:55:37 default[20210729t185736] },
2021-07-30 11:55:37 default[20210729t185736] "original": {
2021-07-30 11:55:37 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "syscall": "connect",
2021-07-30 11:55:37 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:55:37 default[20210729t185736] "port": 5432
2021-07-30 11:55:37 default[20210729t185736] },
2021-07-30 11:55:37 default[20210729t185736] "stack": "SequelizeConnectionError: connect ETIMEDOUT 34.72.218.162:5432\n at /workspace/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24\n at Connection.connectingErrorHandler (/workspace/node_modules/pg/lib/client.js:213:14)\n at Connection.emit (events.js:314:20)\n at Socket.reportStreamError (/workspace/node_modules/pg/lib/connection.js:57:10)\n at Socket.emit (events.js:314:20)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)"
2021-07-30 11:55:37 default[20210729t185736] }
2021-07-30 11:55:37 default[20210729t185736] [forest] 🌳🌳🌳 Unexpected error: connect ETIMEDOUT 34.72.218.162:5432
2021-07-30 11:55:37 default[20210729t185736] {
2021-07-30 11:55:37 default[20210729t185736] "name": "SequelizeConnectionError",
2021-07-30 11:55:37 default[20210729t185736] "parent": {
2021-07-30 11:55:37 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "syscall": "connect",
2021-07-30 11:55:37 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:55:37 default[20210729t185736] "port": 5432
2021-07-30 11:55:37 default[20210729t185736] },
2021-07-30 11:55:37 default[20210729t185736] "original": {
2021-07-30 11:55:37 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "syscall": "connect",
2021-07-30 11:55:37 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:55:37 default[20210729t185736] "port": 5432
2021-07-30 11:55:37 default[20210729t185736] },
2021-07-30 11:55:37 default[20210729t185736] "stack": "SequelizeConnectionError: connect ETIMEDOUT 34.72.218.162:5432\n at /workspace/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24\n at Connection.connectingErrorHandler (/workspace/node_modules/pg/lib/client.js:213:14)\n at Connection.emit (events.js:314:20)\n at Socket.reportStreamError (/workspace/node_modules/pg/lib/connection.js:57:10)\n at Socket.emit (events.js:314:20)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)"
2021-07-30 11:55:37 default[20210729t185736] }
2021-07-30 11:55:37 default[20210729t185736] [forest] 🌳🌳🌳 Unexpected error: connect ETIMEDOUT 34.72.218.162:5432
2021-07-30 11:55:37 default[20210729t185736] {
2021-07-30 11:55:37 default[20210729t185736] "name": "SequelizeConnectionError",
2021-07-30 11:55:37 default[20210729t185736] "parent": {
2021-07-30 11:55:37 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "syscall": "connect",
2021-07-30 11:55:37 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:55:37 default[20210729t185736] "port": 5432
2021-07-30 11:55:37 default[20210729t185736] },
2021-07-30 11:55:37 default[20210729t185736] "original": {
2021-07-30 11:55:37 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "syscall": "connect",
2021-07-30 11:55:37 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:55:37 default[20210729t185736] "port": 5432
2021-07-30 11:55:37 default[20210729t185736] },
2021-07-30 11:55:37 default[20210729t185736] "stack": "SequelizeConnectionError: connect ETIMEDOUT 34.72.218.162:5432\n at /workspace/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24\n at Connection.connectingErrorHandler (/workspace/node_modules/pg/lib/client.js:213:14)\n at Connection.emit (events.js:314:20)\n at Socket.reportStreamError (/workspace/node_modules/pg/lib/connection.js:57:10)\n at Socket.emit (events.js:314:20)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)"
2021-07-30 11:55:37 default[20210729t185736] }
2021-07-30 11:55:37 default[20210729t185736] [forest] 🌳🌳🌳 Unexpected error: connect ETIMEDOUT 34.72.218.162:5432
2021-07-30 11:55:37 default[20210729t185736] {
2021-07-30 11:55:37 default[20210729t185736] "name": "SequelizeConnectionError",
2021-07-30 11:55:37 default[20210729t185736] "parent": {
2021-07-30 11:55:37 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "syscall": "connect",
2021-07-30 11:55:37 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:55:37 default[20210729t185736] "port": 5432
2021-07-30 11:55:37 default[20210729t185736] },
2021-07-30 11:55:37 default[20210729t185736] "original": {
2021-07-30 11:55:37 default[20210729t185736] "errno": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "code": "ETIMEDOUT",
2021-07-30 11:55:37 default[20210729t185736] "syscall": "connect",
2021-07-30 11:55:37 default[20210729t185736] "address": "34.72.218.162",
2021-07-30 11:55:37 default[20210729t185736] "port": 5432
2021-07-30 11:55:37 default[20210729t185736] },
2021-07-30 11:55:37 default[20210729t185736] "stack": "SequelizeConnectionError: connect ETIMEDOUT 34.72.218.162:5432\n at /workspace/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24\n at Connection.connectingErrorHandler (/workspace/node_modules/pg/lib/client.js:213:14)\n at Connection.emit (events.js:314:20)\n at Socket.reportStreamError (/workspace/node_modules/pg/lib/connection.js:57:10)\n at Socket.emit (events.js:314:20)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)"
2021-07-30 11:55:37 default[20210729t185736] }
2021-07-30 11:55:37 default[20210729t185736] GET /forest/authGroup/count?fields%5BauthGroup%5D=id%2Cname&searchExtended=0&timezone=America%2FSao_Paulo 500 109 - 126570.994 ms
2021-07-30 11:55:37 default[20210729t185736] GET /forest/authGroup/count?fields%5BauthGroup%5D=id%2Cname&searchExtended=0&timezone=America%2FSao_Paulo 500 109 - 115142.805 ms
2021-07-30 11:55:37 default[20210729t185736] GET /forest/authGroup?timezone=America%2FSao_Paulo&fields%5BauthGroup%5D=id%2Cname&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id 500 109 - 127025.037 ms
2021-07-30 11:55:37 default[20210729t185736] GET /forest/authGroup?timezone=America%2FSao_Paulo&fields%5BauthGroup%5D=id%2Cname&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id 500 109 - 115289.621 ms

```

Could you please help me indicating what I am doing wrong.

Best Regards,

Flavio

---

<div class="post-metadata">

**Author:** ![Guillaume\_Cisco](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaume_cisco/32/918_2.png) [@Guillaume\_Cisco](https://community.forestadmin.com/u/Guillaume_Cisco)\
**Post date:** [July 30, 2021, 1:05pm UTC](https://community.forestadmin.com/t/problems-integrating-forestadmin-with-google-cloud-appengine-and-postgres-sql/3021/2 "2021-07-30T13:05:47Z")

</div>

Hello @Flavio_Alves,

It looks like this is a very annoying issue regarding the connection to your database.  
Can you confirm you are able to reach it from your local machine?

We cannot very help except telling you to retry correctly bind your sql database 🙂

I hope you will be able to find what is making trouble connecting to your database.

---

<div class="post-metadata">

**Author:** ![Flavio\_Alves](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/flavio_alves/32/2798_2.png) [@Flavio\_Alves](https://community.forestadmin.com/u/Flavio_Alves)\
**Post date:** [July 30, 2021, 2:25pm UTC](https://community.forestadmin.com/t/problems-integrating-forestadmin-with-google-cloud-appengine-and-postgres-sql/3021/3 "2021-07-30T14:25:56Z")

</div>

Hello @Guillaume_Cisco ,

Thank you for your fast response.

In my local configuration, the operation of the smooth. It works without this kind of issues.

I am starting to work with Google appEngine. Looking at the GCP console, I can see that there are no connection restrictions for apps from the same project. But I don’t know if accessing from the appEngine to the database through the public IP is the correct way to do that.

If it is not the case, I don’t know how to setup the DATABASE\_URL on the ForestAdmin backend.

Looking forward to your remarks.

Best regards,

Flavio

---

<div class="post-metadata">

**Author:** ![Guillaume\_Cisco](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaume_cisco/32/918_2.png) [@Guillaume\_Cisco](https://community.forestadmin.com/u/Guillaume_Cisco)\
**Post date:** [July 30, 2021, 2:44pm UTC](https://community.forestadmin.com/t/problems-integrating-forestadmin-with-google-cloud-appengine-and-postgres-sql/3021/4 "2021-07-30T14:44:20Z")

</div>

I understand @Flavio_Alves,

This is very frustrating.  
Have you already look at the documentation on how to [deploy your admin backend to Google Cloud Platform](https://docs.forestadmin.com/documentation/how-tos/setup/deploy-your-admin-backend-with-google-cloud-platform)

I hope it helps,

Let me know 😉

---

<div class="post-metadata">

**Author:** ![Flavio\_Alves](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/flavio_alves/32/2798_2.png) [@Flavio\_Alves](https://community.forestadmin.com/u/Flavio_Alves)\
**Post date:** [July 30, 2021, 8:03pm UTC](https://community.forestadmin.com/t/problems-integrating-forestadmin-with-google-cloud-appengine-and-postgres-sql/3021/5 "2021-07-30T20:03:24Z")

</div>

Hello @Guillaume_Cisco,

Yes I did. That’s why I decided to create this topic.

I solved the issue here. I studied the source code of the ForestAdmin backend and I realized that it uses the Sequelize, while GCP documentation uses another component as example.

Taking that into account, I found there two links:

- [For those who is interested in using sequelize and PostgreSQL cloud SQL — here is what you need to… | by Pavel Polyakov | Medium](https://medium.com/@pavelpolyakov/for-those-who-is-interested-in-using-sequelize-and-postgresql-cloud-sql-here-is-what-you-need-to-575552822583)
- [node.js - Defining Sequelize on google cloud sql nodejs - Stack Overflow](https://stackoverflow.com/questions/51214792/defining-sequelize-on-google-cloud-sql-nodejs)

And I changed the database initialization in the ForestAdmin backend:

File _index.js_

```javascript
databasesConfiguration.forEach((databaseInfo) => {
  // const connection = new Sequelize(databaseInfo.connection.url, databaseInfo.connection.options);
  const connection = new Sequelize(databaseInfo.connection.dbName, databaseInfo.connection.username, databaseInfo.connection.password, {
    dialect: 'postgres',

    host: process.env.DATABASE_GCLOUD,
    pool: {
        max: 5,
        min: 0,
        acquire: 30000,
        idle: 10000
    },
    dialectOptions: {
        // e.g. socketPath: '/cloudsql/my-awesome-project:us-central1:my-cloud-sql-instance'
        // same as host string above
        socketPath: process.env.DATABASE_GCLOUD
    },
    logging: false,
    operatorsAliases: false
  });

```

I added new environment variables with database connection information:

File _database.js_:

```javascript
module.exports = [{
  name: 'default',
  modelsDir: path.resolve(__dirname, '../models'),
  connection: {
    dbName: process.env.DATABASE_NAME,
    username: process.env.DATABASE_USER,
    password: process.env.DATABASE_PASSWORD,
    url: process.env.DATABASE_URL,
    options: { ...databaseOptions },
  },
}];

```

File _app.yaml_:

```javascript
runtime: nodejs12
env_variables:
   FOREST_ENV_SECRET: 'xxxx'
   FOREST_AUTH_SECRET: 'yyyyy'
   NODE_ENV: 'production'
   DATABASE_URL: '<generated from forestadmin>'
   DATABASE_USER: '<database username>'
   DATABASE_PASSWORD: '<database password>'
   DATABASE_NAME: '<database name>'
   DATABASE_GCLOUD: '<gcp database id>'
   APPLICATION_URL: '<app url>'

```

Finally, on Google Cloud console, I set the app engine project to be a SQL Cloud Admin, on IAM configuration. I believe that it will also work in case of SQL client configuration too.

I don’t know if it is a generic solution, to be added on application main source code. At least, for GCP SQL, it works nice.

Hope it helps,

Best regards,

Flavio

---

<div class="post-metadata">

**Author:** ![Guillaume\_Cisco](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaume_cisco/32/918_2.png) [@Guillaume\_Cisco](https://community.forestadmin.com/u/Guillaume_Cisco)\
**Post date:** [August 2, 2021, 7:39am UTC](https://community.forestadmin.com/t/problems-integrating-forestadmin-with-google-cloud-appengine-and-postgres-sql/3021/6 "2021-08-02T07:39:50Z")

</div>

Thank you very much @Flavio_Alves for this deep work on the GCP part!  
I’m glad it now works for you! 🎉

I will look in details about what you have done to see if we need to update things from our side.

Have a great day, ☀
