Report this

What is the reason for this report?

Use Redis via App Platform specification

Posted on January 8, 2021

I have a app specification that specifies a number of different things: 1 static site, 1 nodejs service and a postgres database. This works completely fine when running with doctl apps create/update but when I add a redis instance as well:

...
databases:
  - name: hackathon-runner-redis
    engine: REDIS
    production: true
    cluster_name: hackathon-runner-db-cluster

I can’t seem to find any error details and no logs are visible for the deployment. Am I doing something wrong or does this just not work?

Thanks in advance!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You’ll have to pre-create the Redis server in our Managed Databases section

name: sample-example
region: nyc
services:
- ..................
  envs:
  - key: REDIS_URL
    scope: RUN_TIME
    value: ${my-redis.DATABASE_URL}
................
databases:
- cluster_name: my-redis
  engine: REDIS
  name: my-redis
  production: true
  version: "5"

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.