Deployment with Docker (Generic/Mocked Adapter)
This guide will walk you through deploying the ID PASS DataCollect application using Docker with a generic or mocked adapter for development purposes. This is useful when you want to run the application without a specific backend adapter.
Prerequisites
Before you begin, ensure you have the following installed:
Step 1: Clone the Repository
First, clone the ID PASS DataCollect repository to your local machine:
git clone https://github.com/idpass/idpass-data-collect.git
cd idpass-data-collect
Step 2: Configure Environment Variables
Copy the example environment file into place:
cp docker/.env.example docker/.env
Edit docker/.env to change the default admin credentials, JWT secret, and CORS origins. The defaults are sufficient to boot the stack locally but must be changed before any non-local deployment.
Key requirements:
ADMIN_PASSWORDmust be ≥8 characters and include uppercase, lowercase, digit, and special characterJWT_SECRETmust be ≥32 characters
Step 3: Build and Run Docker Containers
From the repository root, bring up the development compose stack:
docker compose -f docker/docker-compose.dev.yaml up --build -d
This command will:
--build: Build the Docker images (if not already built).-d: Run the containers in detached mode (in the background).
Step 4: Verify Deployment
After the containers are up and running, you can verify their status:
docker compose -f docker/docker-compose.dev.yaml ps
Expected services and host URLs:
| Service | URL |
|---|---|
| Sync server | http://localhost:3000 (health at /health) |
| Admin UI | http://localhost:5173 |
| Web app | http://localhost:5174 |
| Mobile app (browser) | http://localhost:8081 |
| PostgreSQL | localhost:5432 |
Step 5: Stop and Remove Containers
To stop the stack:
docker compose -f docker/docker-compose.dev.yaml down
To remove the PostgreSQL volume as well (clean slate):
docker compose -f docker/docker-compose.dev.yaml down --volumes