Skip to main content

☁️ 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​

ServiceImagePortHealth Check
appichwansh34/apexium-log-app:latest8080/actuator/health
dbpostgres:175432pg_isready
redisredis:alpine6379redis-cli ping
minioquay.io/minio/minio9000/9001Console UI

Environment Variables​

Salesforce (required)​

VariableDescriptionExample
SALESFORCE_INSTANCE_ORGSalesforce login URLhttps://yourorg.my.salesforce.com
SALESFORCE_CLIENT_IDConnected App consumer key3MVG9...
SALESFORCE_CLIENT_SECRETConnected App consumer secretAABBCC...
SALESFORCE_GRANT_TYPEOAuth grant typeclient_credentials
SALESFORCE_API_VERSIONAPI versionv61.0

Database​

VariableDefaultDescription
DB_HOSTlocalhost (dev) / db (Docker)PostgreSQL host
DB_PORT5432PostgreSQL port
DB_NAMEsfdc_logsDatabase name
DB_USERpostgresDatabase user
DB_PASSWORDpostgresDatabase password

Redis​

VariableDefaultDescription
REDIS_HOSTlocalhost (dev) / redis (Docker)Redis host
REDIS_PORT6379Redis port

MinIO (S3-compatible)​

VariableDefaultDescription
MINIO_URLhttp://localhost:9000MinIO endpoint
MINIO_ROOT_USERminioadminMinIO root user
MINIO_ROOT_PASSWORDminioadminMinIO root password
MINIO_ACCESS_KEYminioadminApp access key
MINIO_SECRET_KEYminioadminApp secret key
MINIO_BUCKET_NAMEsfdc-bucketStorage bucket

Application​

VariableDefaultDescription
APEXIUM_API_KEYauto-generatedAPI key for backend access
APEXIUM_CORS_ALLOWED_ORIGINShttp://localhost:5173Allowed CORS origins

Health Check​

Spring Boot Actuator exposes these endpoints:

EndpointURLPurpose
Healthhttp://localhost:8080/actuator/healthApplication health status
Infohttp://localhost:8080/actuator/infoApplication info
Metricshttp://localhost:8080/actuator/metricsApplication 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_ORIGINS to 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=validate for production
  • Review Salesforce API rate limits for your org