☁️ Deployment & Operations
Production deployment, environment variables, monitoring, and backups.
Quick Start
The apexium CLI handles everything:
git clone https://github.com/ichwansh03/apexium-log.git
cd apexium-log
chmod +x apexium
./apexium start
On first run, the setup wizard prompts for Salesforce credentials and generates all config automatically.
Docker Hub Image
The pre-built image is available on Docker Hub:
docker pull ichwansh34/apexium-log-app:latest
:::tip Recommended Using the pre-built image is the fastest way to get started — no local build required. :::
Run with Docker Hub image
# Create .env file first (see below), then:
docker compose up -d
Or run standalone:
docker run -d \
--name apexium-log \
-p 8080:8080 \
--env-file .env \
ichwansh34/apexium-log-app:latest
Manual Docker Compose Deployment
If you prefer manual setup without the CLI wizard:
1. Create .env file
# Salesforce (required)
SALESFORCE_INSTANCE_ORG=https://yourorg.my.salesforce.com
SALESFORCE_CLIENT_ID=your_consumer_key
SALESFORCE_CLIENT_SECRET=your_consumer_secret
SALESFORCE_GRANT_TYPE=client_credentials
SALESFORCE_API_VERSION=v61.0
# PostgreSQL
DB_HOST=db
DB_PORT=5432
DB_NAME=sfdc_logs
DB_USER=postgres
DB_PASSWORD=your_secure_password
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
# MinIO
MINIO_URL=http://minio:9000
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=your_minio_password
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=your_minio_password
MINIO_BUCKET_NAME=sfdc-bucket
# App
APEXIUM_API_KEY=your_api_key
APEXIUM_CORS_ALLOWED_ORIGINS=http://localhost:5173
2. Start the stack
docker compose up -d --build
3. Verify health
curl http://localhost:8080/actuator/health
# {"status":"UP"}
Dockerfile
Multi-stage build for optimized production images:
# Build stage
FROM eclipse-temurin:25-jdk-jammy AS build
WORKDIR /app
COPY .mvn/ .mvn
COPY mvnw pom.xml ./
RUN chmod +x mvnw
# Cache dependencies
RUN --mount=type=cache,target=/root/.m2/repository \
for i in 1 2 3; do \
./mvnw dependency:go-offline -B && break || \
echo "Attempt $i failed, retrying..." && sleep 5; \
done
COPY src ./src
RUN --mount=type=cache,target=/root/.m2/repository \
./mvnw clean package -DskipTests -B
# Run stage
FROM eclipse-temurin:25-jre-jammy
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]
Services Architecture
| Service | Image | Port | Health Check |
|---|---|---|---|
| app | ichwansh34/apexium-log-app:latest | 8080 | /actuator/health |
| db | postgres:17 | 5432 | pg_isready |
| redis | redis:alpine | 6379 | redis-cli ping |
| minio | quay.io/minio/minio | 9000/9001 | Console UI |
Environment Variables
Salesforce (required)
| Variable | Description | Example |
|---|---|---|
SALESFORCE_INSTANCE_ORG | Salesforce login URL | https://yourorg.my.salesforce.com |
SALESFORCE_CLIENT_ID | Connected App consumer key | 3MVG9... |
SALESFORCE_CLIENT_SECRET | Connected App consumer secret | AABBCC... |
SALESFORCE_GRANT_TYPE | OAuth grant type | client_credentials |
SALESFORCE_API_VERSION | API version | v61.0 |
Database
| Variable | Default | Description |
|---|---|---|
DB_HOST | localhost (dev) / db (Docker) | PostgreSQL host |
DB_PORT | 5432 | PostgreSQL port |
DB_NAME | sfdc_logs | Database name |
DB_USER | postgres | Database user |
DB_PASSWORD | postgres | Database password |
Redis
| Variable | Default | Description |
|---|---|---|
REDIS_HOST | localhost (dev) / redis (Docker) | Redis host |
REDIS_PORT | 6379 | Redis port |
MinIO (S3-compatible)
| Variable | Default | Description |
|---|---|---|
MINIO_URL | http://localhost:9000 | MinIO endpoint |
MINIO_ROOT_USER | minioadmin | MinIO root user |
MINIO_ROOT_PASSWORD | minioadmin | MinIO root password |
MINIO_ACCESS_KEY | minioadmin | App access key |
MINIO_SECRET_KEY | minioadmin | App secret key |
MINIO_BUCKET_NAME | sfdc-bucket | Storage bucket |
Application
| Variable | Default | Description |
|---|---|---|
APEXIUM_API_KEY | auto-generated | API key for backend access |
APEXIUM_CORS_ALLOWED_ORIGINS | http://localhost:5173 | Allowed CORS origins |
Health Check
Spring Boot Actuator exposes these endpoints:
| Endpoint | URL | Purpose |
|---|---|---|
| Health | http://localhost:8080/actuator/health | Application health status |
| Info | http://localhost:8080/actuator/info | Application info |
| Metrics | http://localhost:8080/actuator/metrics | Application metrics |
CI/CD
GitHub Actions (planned)
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- run: ./mvnw clean verify -B
- run: cd frontend && npm ci && npm run build
Docker Image Build
# Pull from Docker Hub (recommended)
docker pull ichwansh34/apexium-log-app:latest
# Or build locally
docker compose build
# Or build standalone
docker build -t apexium-log:latest .
Backups
PostgreSQL
# Dump
docker exec apexium-log-db-1 pg_dump -U postgres sfdc_logs > backup.sql
# Restore
cat backup.sql | docker exec -i apexium-log-db-1 psql -U postgres sfdc_logs
MinIO
Enable versioning on the sfdc-bucket for object-level rollback:
mc version enable myminio/sfdc-bucket
Production Checklist
- Pull latest image:
docker pull ichwansh34/apexium-log-app:latest - Change default PostgreSQL password
- Change default MinIO credentials
- Generate unique
APEXIUM_API_KEY - Set
APEXIUM_CORS_ALLOWED_ORIGINSto your frontend domain - Schedule daily PostgreSQL backups
- Enable MinIO bucket versioning
- Configure SSL/TLS termination (nginx, Traefik, or cloud load balancer)
- Set
spring.jpa.hibernate.ddl-auto=validatefor production - Review Salesforce API rate limits for your org