5.5 KiB
5.5 KiB
Eureka Platform Infrastructure Reference
Reference documentation for services available on the Eureka deployment platform.
Injected Environment Variables
These variables are automatically injected by Eureka platform at runtime:
# Database
DATABASE_URL
# MinIO
MINIO_ENDPOINT
MINIO_PORT
MINIO_ROOT_USER
MINIO_ROOT_PASSWORD
MINIO_BUCKET_NAME
MINIO_USE_SSL
MINIO_PUBLIC_URL
Available Services
PostgreSQL Database
| Setting | Value |
|---|---|
| Host | postgres (Docker network) |
| Port | 5432 |
| Database | eurekalabo |
| Username | appuser |
| Password | supersecret |
| Connection URL | postgresql://appuser:supersecret@postgres:5432/eurekalabo |
Environment Variable (injected):
DATABASE_URL="postgresql://appuser:supersecret@postgres:5432/eurekalabo"
MinIO Object Storage (S3-Compatible)
| Setting | Value |
|---|---|
| Endpoint | minio (Docker network) |
| Port | 9000 |
| Root User | minioadmin |
| Root Password | minioadmin |
| Bucket Name | eurekalabo-files |
| Use SSL | false |
| Public URL | https://minio.162-43-92-100.nip.io |
Environment Variables (injected):
MINIO_ENDPOINT="minio"
MINIO_PORT="9000"
MINIO_ROOT_USER="minioadmin"
MINIO_ROOT_PASSWORD="minioadmin"
MINIO_BUCKET_NAME="eurekalabo-files"
MINIO_USE_SSL="false"
MINIO_PUBLIC_URL="https://minio.162-43-92-100.nip.io"
Docker Network Architecture
Services run on shared Docker networks:
base_data- Database connectionsbase_web- Web/HTTP trafficshared_backend- Internal service communication
Your application container automatically joins these networks when deployed.
Framework Integration
Prisma (Node.js)
prisma/schema.prisma:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
No changes needed - Prisma reads DATABASE_URL automatically.
Drizzle (Node.js)
drizzle.config.ts:
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
schema: './src/db/schema.ts',
out: './drizzle',
dialect: 'postgresql',
dbCredentials: {
url: process.env.DATABASE_URL!,
},
});
SQLAlchemy (Python)
from sqlalchemy import create_engine
import os
engine = create_engine(os.environ['DATABASE_URL'])
MinIO / S3 Client (Node.js)
Using AWS SDK v3:
import { S3Client } from '@aws-sdk/client-s3';
const s3 = new S3Client({
endpoint: `http://${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}`,
region: 'us-east-1',
credentials: {
accessKeyId: process.env.MINIO_ROOT_USER!,
secretAccessKey: process.env.MINIO_ROOT_PASSWORD!,
},
forcePathStyle: true, // Required for MinIO
});
// Use bucket: process.env.MINIO_BUCKET_NAME
Using MinIO SDK:
import { Client } from 'minio';
const minio = new Client({
endPoint: process.env.MINIO_ENDPOINT!,
port: parseInt(process.env.MINIO_PORT || '9000'),
useSSL: process.env.MINIO_USE_SSL === 'true',
accessKey: process.env.MINIO_ROOT_USER!,
secretKey: process.env.MINIO_ROOT_PASSWORD!,
});
// Use bucket: process.env.MINIO_BUCKET_NAME
MinIO / S3 Client (Python)
Using boto3:
import boto3
import os
s3 = boto3.client(
's3',
endpoint_url=f"http://{os.environ['MINIO_ENDPOINT']}:{os.environ['MINIO_PORT']}",
aws_access_key_id=os.environ['MINIO_ROOT_USER'],
aws_secret_access_key=os.environ['MINIO_ROOT_PASSWORD'],
)
# Use bucket: os.environ['MINIO_BUCKET_NAME']
Dockerfile Environment Variables
When building Docker images, these environment variables are injected at runtime, NOT build time.
DO NOT hardcode credentials in Dockerfile.
Correct pattern:
# Runtime env vars - set by Eureka platform
ENV NODE_ENV=production
# DATABASE_URL, MINIO_* injected at runtime
Wrong pattern:
# NEVER DO THIS
ENV DATABASE_URL="postgresql://..."
ENV MINIO_ROOT_PASSWORD="..."
Pre-Deployment Checklist
Before deploying, verify your app:
- Reads from environment variables (not hardcoded)
- Has
.env.exampledocumenting required vars - Dockerfile doesn't contain secrets
- Database migrations are ready (
prisma migrate deploy, etc.)
Migration Commands
Prisma:
npx prisma migrate deploy
Drizzle:
npx drizzle-kit migrate
Django:
python manage.py migrate
Troubleshooting
Database Connection Failed
- Check container is on correct networks
- Verify
DATABASE_URLformat - Check postgres container is running:
docker ps | grep postgres
MinIO Upload Failed
- Verify bucket exists:
eurekalabo-files - Check
forcePathStyle: truefor AWS SDK - Verify endpoint format:
http://minio:9000(nothttps)
Environment Variables Not Available
- Check
.envfile exists (copy from.env.example) - Verify Eureka deployment injects vars
- Check Docker Compose env_file configuration