Installation

Install and configure MediFlux for your environment.

1 min read

MediFlux supports multiple deployment methods to fit your infrastructure requirements. Whether you prefer containerized deployments with Docker, a traditional manual installation, or a fully managed cloud instance, this guide covers each approach in detail.

System Requirements

Before installing MediFlux, ensure your environment meets the following minimum requirements:

ComponentMinimumRecommended
CPU2 cores4+ cores
RAM4 GB8+ GB
Disk Space20 GB50+ GB SSD
Operating SystemUbuntu 20.04+ / RHEL 8+Ubuntu 22.04 LTS
PostgreSQL14.016.0+
Node.js18.020.0+ LTS
Redis6.07.0+

For production deployments serving more than 50 concurrent users, we recommend the higher-end specifications along with a dedicated database server.

Installation Methods

Docker is the recommended installation method for most deployments. It handles all dependencies automatically and provides consistent behavior across environments.

Prerequisites

  • Docker Engine 24.0 or later
  • Docker Compose v2.20 or later

Step 1: Pull the MediFlux Image

Pull the latest stable image
docker pull mediflux/mediflux:latest

Step 2: Create a Docker Compose File

docker-compose.yml
version: "3.9"

services:
  mediflux:
    image: mediflux/mediflux:latest
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgresql://mediflux:password@db:5432/mediflux
      REDIS_URL: redis://redis:6379
      MEDIFLUX_SECRET_KEY: ${MEDIFLUX_SECRET_KEY}
      MEDIFLUX_ENV: production
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_started
    volumes:
      - mediflux_uploads:/app/uploads

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: mediflux
      POSTGRES_PASSWORD: password
      POSTGRES_DB: mediflux
    volumes:
      - mediflux_db:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U mediflux"]
      interval: 5s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7-alpine
    volumes:
      - mediflux_redis:/data

volumes:
  mediflux_db:
  mediflux_redis:
  mediflux_uploads:

Step 3: Start the Services

Launch MediFlux
docker compose up -d

MediFlux will be available at http://localhost:3000 once all services are healthy.

Change the default database password before deploying to production. Use Docker secrets or an environment file to manage sensitive credentials.

Verifying the Installation

After installation, verify that MediFlux is running correctly:

Health check
curl http://localhost:3000/api/health

You should receive a response like:

Expected response
{
  "status": "healthy",
  "version": "2.4.1",
  "database": "connected",
  "redis": "connected",
  "uptime": "12s"
}

Next Steps

With MediFlux installed and running, proceed to Configuration to customize the platform for your pharmacy's workflow, or jump straight to Getting Started to set up your first pharmacy location.