|
| 1 | +# Dev Docker Compose |
| 2 | + |
| 3 | +This docker-compose file sets up the development environment for the Metastate project. |
| 4 | + |
| 5 | +## Core Services (Always Running) |
| 6 | + |
| 7 | +- **registry** - Runs on port 4321 |
| 8 | +- **evault-core** - Runs on ports 3001 (Express/Provisioning) and 4000 (Fastify/GraphQL) |
| 9 | +- **neo4j** - Runs on ports 7474 (HTTP) and 7687 (Bolt) for graph data storage |
| 10 | +- **postgres** - Runs on port 5432 with multiple databases pre-created |
| 11 | + |
| 12 | +## Optional Platform Services |
| 13 | + |
| 14 | +Use Docker Compose profiles to enable optional platforms: |
| 15 | + |
| 16 | +### Available Profiles |
| 17 | + |
| 18 | +- `pictique` - Pictique API (port 1111) |
| 19 | +- `evoting` - eVoting API (port 4000) |
| 20 | +- `dreamsync` - DreamSync API (port 4001) |
| 21 | +- `cerberus` - Cerberus (port 3002) |
| 22 | +- `group-charter` - Group Charter Manager API (port 3003) |
| 23 | +- `blabsy` - Blabsy W3DS Auth API (port 3000) |
| 24 | +- `ereputation` - eReputation (port 5000) |
| 25 | +- `marketplace` - Marketplace (port 5001) |
| 26 | +- `all` - Enable all optional platforms at once |
| 27 | + |
| 28 | +## Usage |
| 29 | + |
| 30 | +### Start core services only: |
| 31 | +```bash |
| 32 | +docker compose -f dev-docker-compose.yaml up |
| 33 | +``` |
| 34 | + |
| 35 | +### Start with specific platforms: |
| 36 | +```bash |
| 37 | +# Single platform |
| 38 | +docker compose -f dev-docker-compose.yaml --profile pictique up |
| 39 | + |
| 40 | +# Multiple platforms |
| 41 | +docker compose -f dev-docker-compose.yaml --profile pictique --profile evoting up |
| 42 | + |
| 43 | +# All platforms |
| 44 | +docker compose -f dev-docker-compose.yaml --profile all up |
| 45 | +``` |
| 46 | + |
| 47 | +### Background mode: |
| 48 | +```bash |
| 49 | +docker compose -f dev-docker-compose.yaml --profile pictique up -d |
| 50 | +``` |
| 51 | + |
| 52 | +### Stop services: |
| 53 | +```bash |
| 54 | +docker compose -f dev-docker-compose.yaml down |
| 55 | +``` |
| 56 | + |
| 57 | +### View logs: |
| 58 | +```bash |
| 59 | +# All services |
| 60 | +docker compose -f dev-docker-compose.yaml logs -f |
| 61 | + |
| 62 | +# Specific service |
| 63 | +docker compose -f dev-docker-compose.yaml logs -f registry |
| 64 | +``` |
| 65 | + |
| 66 | +## Environment Variables |
| 67 | + |
| 68 | +Create a `.env` file in the project root with your configuration: |
| 69 | + |
| 70 | +```env |
| 71 | +# Registry |
| 72 | +REGISTRY_SHARED_SECRET=your-secret-here |
| 73 | +PUBLIC_REGISTRY_URL=http://localhost:4321 |
| 74 | +
|
| 75 | +# Database URLs (optional - defaults are provided) |
| 76 | +REGISTRY_DATABASE_URL=postgresql://postgres:postgres@postgres:5432/registry |
| 77 | +NEO4J_URI=bolt://neo4j:7687 |
| 78 | +NEO4J_USER=neo4j |
| 79 | +NEO4J_PASSWORD=neo4j |
| 80 | +``` |
| 81 | + |
| 82 | +## Notes |
| 83 | + |
| 84 | +- All services mount the source code for hot-reload development |
| 85 | +- Node modules are stored in Docker volumes to avoid host conflicts |
| 86 | +- PostgreSQL automatically creates all required databases on first startup |
| 87 | +- Services wait for database health checks before starting |
| 88 | + |
| 89 | + |
0 commit comments