Use Redis via App Platform specification

Posted January 8, 2021 1.7k views
RedisDigitalOcean Managed RedisDigitalOcean App Platform

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:

  - 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!

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.

Submit an Answer
1 answer

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

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