Question

Use Redis via App Platform specification

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!

Subscribe
Share

Submit an 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"