Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ yarn-error.log*
# Misc
.DS_Store
*.pem


evault-cache.json

evault-cache.json

.pnpm-store
.pnpm-store/
21 changes: 21 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:20-alpine

WORKDIR /app

# Install pnpm
RUN npm install -g [email protected]

# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

ENTRYPOINT ["docker-entrypoint.sh"]

# Copy only root config files - source code comes via volumes
# This keeps the image small and export fast
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json ./

# Note: Dependencies are installed on first container run via entrypoint script
# This avoids huge layer exports during build. Volumes mount source code,
# and entrypoint ensures deps are installed before running commands.

89 changes: 89 additions & 0 deletions dev-docker-compose.README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Dev Docker Compose

This docker-compose file sets up the development environment for the Metastate project.

## Core Services (Always Running)

- **registry** - Runs on port 4321
- **evault-core** - Runs on ports 3001 (Express/Provisioning) and 4000 (Fastify/GraphQL)
- **neo4j** - Runs on ports 7474 (HTTP) and 7687 (Bolt) for graph data storage
- **postgres** - Runs on port 5432 with multiple databases pre-created

## Optional Platform Services

Use Docker Compose profiles to enable optional platforms:

### Available Profiles

- `pictique` - Pictique API (port 1111)
- `evoting` - eVoting API (port 4000)
- `dreamsync` - DreamSync API (port 4001)
- `cerberus` - Cerberus (port 3002)
- `group-charter` - Group Charter Manager API (port 3003)
- `blabsy` - Blabsy W3DS Auth API (port 3000)
- `ereputation` - eReputation (port 5000)
- `marketplace` - Marketplace (port 5001)
- `all` - Enable all optional platforms at once

## Usage

### Start core services only:
```bash
docker compose -f dev-docker-compose.yaml up
```

### Start with specific platforms:
```bash
# Single platform
docker compose -f dev-docker-compose.yaml --profile pictique up

# Multiple platforms
docker compose -f dev-docker-compose.yaml --profile pictique --profile evoting up

# All platforms
docker compose -f dev-docker-compose.yaml --profile all up
```

### Background mode:
```bash
docker compose -f dev-docker-compose.yaml --profile pictique up -d
```

### Stop services:
```bash
docker compose -f dev-docker-compose.yaml down
```

### View logs:
```bash
# All services
docker compose -f dev-docker-compose.yaml logs -f

# Specific service
docker compose -f dev-docker-compose.yaml logs -f registry
```

## Environment Variables

Create a `.env` file in the project root with your configuration:

```env
# Registry
REGISTRY_SHARED_SECRET=your-secret-here
PUBLIC_REGISTRY_URL=http://localhost:4321

# Database URLs (optional - defaults are provided)
REGISTRY_DATABASE_URL=postgresql://postgres:postgres@postgres:5432/registry
NEO4J_URI=bolt://neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=neo4j
```

## Notes

- All services mount the source code for hot-reload development
- Node modules are stored in Docker volumes to avoid host conflicts
- PostgreSQL automatically creates all required databases on first startup
- Services wait for database health checks before starting


Loading
Loading