Databases and storage
PostgreSQL for each app and branch, Redis, private storage buckets and persistent drives, with your database backed up before every deploy.
Where your data lives
Declare what your app needs in appmecca.yaml. AppMecca sets it up on the next deploy and gives your app the connection details.
A database per app and branch
Set database.enabled to true, and AppMecca creates a PostgreSQL database and user for each branch on its first deploy. Your app reads them from DATABASE_URL.
Redis with one setting
Set redis.enabled to true, and your app gets REDIS_URL for a managed Redis server. The server is shared, so prefix your keys with the CACHE_PREFIX each app and branch is given.
Private buckets for your files
Name a bucket in appmecca.yaml and get a private, encrypted S3 bucket with credentials scoped to your app. Browse and upload its files from the CLI or the dashboard.
Drives that survive deploys
A drive is a persistent folder mounted into your service and shared by its replicas. It keeps its files across deploys, and you can browse it from the CLI or the dashboard.
A backup before every deploy
AppMecca backs up your database before each deploy. Take your own backup whenever you like with mecca app backup: your database and drives, as one checksummed bundle.
Bring your existing database
Upload a pg_dump of up to 5 GB from the CLI or the dashboard's Database tab. AppMecca takes a safety backup first, restores your dump and shows you a row count for each table.
Declare it, then back it up
The data services in appmecca.yaml, and the commands that back up a database or load one in.
containers:
- name: app
dockerfile: Dockerfile
deploy:
- name: web
container: app
port: 8000
health_check:
path: /health
drives:
- name: uploads
path: /app/uploads # where the drive is mounted
database:
enabled: true # your app reads DATABASE_URL
max_connections: 5 # the default, per replica
redis:
enabled: true # your app reads REDIS_URL
storage:
drives:
- name: uploads
size_gb: 5
buckets:
- name: media # a private S3 bucket# Back up the database and drives as one bundle:
$ mecca app backup myapp -d "before-migration"
$ mecca app backups myapp
# Load an existing database from a pg_dump file:
$ mecca app restore-upload myapp --file prod.dumpGood to know
- PostgreSQL runs on one shared, Multi-AZ server. Each app and branch gets its own database and user on it, not a dedicated instance.
- There are no scheduled backups yet. Backups happen before each deploy and whenever you ask for one.
- Point-in-time recovery isn't self-service: our team runs it, for the shared database.
- Backup bundles hold your database and drives. Bucket files and Redis data aren't in them.
- Each drive is capped at 100 GB. Above 5 GB of drives per app, your team needs a storage grant from us first.