Option 1: Fast In-Memory with PGLite (Recommended for Development)
Perfect for quick testing and development. By default, all data is stored in memory and will be lost when the container stops. Use volume persistence to maintain data between restarts (if needed).
```bash
# Pull the latest image
docker pull andrecrjr/mockzilla:latest
# run with volume persistence to maintain data between container restarts
docker run -p 36666:36666 \
-v mockzilla-data:/data \
andrecrjr/mockzilla:latest
```
> [!TIP]
> This option is ideal for development, testing, and quick experimentation. It starts instantly with no external dependencies. Use volume persistence to keep your mocks between container restarts.
Your mock server will be available at http://localhost:36666
Option 2: Persistent with External PostgreSQL (Recommended for Production)
For production use or when you need data persistence between container restarts.
```bash
# Pull the latest image
docker pull andrecrjr/mockzilla:latest
# Run with external PostgreSQL database
docker run -p 36666:36666 \
-e DATABASE_URL=postgresql://username:password@host:5432/database_name \
andrecrjr/mockzilla:latest
```
> [!NOTE]
> This option is recommended for production environments where data persistence is required. Make sure your PostgreSQL database is accessible from the container.
Your mock server will be available at http://localhost:36666