The Militant API can be installed in several ways depending on your needs.
The API is in the /api/ folder of your Militant instance with its own configuration.
Default configuration:
Customize connection:
If you want to connect the API to another database, create /api/.env:
API_DB_HOST=other-server.com
API_DB_NAME=militant
API_DB_USER=api_user
API_DB_PASS=password
Test:
curl https://your-instance.com/api/v1/
Run the API on a separate server with Docker.
Quick installation:
cd api/
cp .env.example .env
nano .env # Configure
docker-compose up -d
Installation via CasaOS App Store.
Installation: 1. Open App Center 2. Custom Install 3. Paste docker-compose.casaos.yml
After installation: 1. Test the API 2. Explore endpoints 3. Read FAQ