Docker Setup
Running Ciyex EHR using Docker Compose.
Prerequisites
- Docker Engine
- Docker Compose
Quick Start
-
Clone Repo:
git clone https://github.com/ciyex-org/ciyex.git
cd ciyex -
Start Services:
docker-compose up -dThis spins up:
- Postgres (DB)
- Ciyex API (Backend)
- Ciyex UI (Frontend)
- MailHog (Email Test)
-
Access:
- Frontend:
http://localhost:3000 - Backend:
http://localhost:8080 - MailHog:
http://localhost:8025
- Frontend:
Docker Configuration
Compose File (docker-compose.yml)
version: '3.8'
services:
postgres:
image: postgres:16
ports: ["5432:5432"]
environment:
POSTGRES_DB: ciyexdb
POSTGRES_PASSWORD: password
api:
build: .
ports: ["8080:8080"]
depends_on: [postgres]
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/ciyexdb
Production Docker
For production, we use Multi-Stage builds to keep images small.
- Build:
docker build -t ciyex-api:prod . - Run:
docker run -d -p 80:8080 \
-e SPRING_PROFILES_ACTIVE=prod \
ciyex-api:prod