First-time Setup
Follow these steps if you're installing Chap Core for the first time.
Warning
We highly recommend you to have read the recommendation for server deployment before reading this guide.
Prerequisites
- Docker and Docker Compose installed on your system
- Git for cloning the repository
1. Clone the Chap Core Repository
2. Checkout the Desired Version
Fetch the available versions and checkout the version you want to install. Check the releases on GitHub to see what the latest release is.
# Fetch all tags
git fetch --tags
# List available versions
git tag -l
# Checkout a specific version
git checkout [VERSION] #Replace with your desired version, e.g. v1.0.18
For latest release go to: https://github.com/dhis2-chap/chap-core/releases
3. Start Chap Core
This single command will:
- Pull all required Docker images
- Start the PostgreSQL database
- Start the Redis cache
- Start the Chap Core API server
- Start the Celery worker for background jobs
- Automatically create and initialize your database
The Chap Core REST API will be available at http://localhost:8000 once all services are running.
4. Verify the Installation
You can verify that Chap Core is running correctly by:
-
Check the API documentation: Visit
http://localhost:8000/docsin your browser to see the interactive API documentation -
Check the health endpoint:
- View service logs:
Common Operations
Stopping Chap Core
To stop all services:
This preserves your database data. To start again, simply run docker compose up.
Viewing Logs
To view logs from all services:
To view logs from a specific service: