Data management

Overview

code.store platform allows you use two database types for your services:
Based on standards for building a microservice architecture, we follow database-per-service design pattern and generate separate database for each service.
Connection details are provided in env variables.
You can manage your data using visual data manager using backoffice on the service page (will be available soon)

Postgres

code.store platform by default creates a Postgres database for each your service. You can enable or disable database using codestore.yaml configuration file in the root service directory.
You have no limits in your database and can store any data there, code.store platform takes care of the scaling of your relational database so your database can keep up with the increasing demands of your application or applications.
To disable or enable Postgres database for your service just set it in skipDatabase flag.
  • true - to disable Postgres database
  • false (default value) - to enable it
serviceConfiguration:
skipDatabase: true
You can find connection to your database in context variable which available inside each handler method. More information about context objects can be found in GraphQL and REST sections.
To apply changes just push your service code using cs push command

Redis

To disable or enable Redis database for your service just set it in enableRedis flag.
  • true - to enable Redis database
  • false (default value) - to disable it
serviceConfiguration:
enableRedis: true
You have no limits in your Redis database and can store any data there, code.store platform takes care of the scaling of memory usage so your database can keep up with the increasing demands of your application or applications.
To get credentials for Redis database use next env variables:
REDIS_HOST
REDIS_PORT
More information about accessing environment variables can be found in Environment variables section.
Export as PDF
Copy link