- Create ingest-api with Koa framework for handling device telemetry. - Implement telemetry ingestion with MongoDB, Redis, and PostgreSQL. - Add API endpoints for telemetry and health checks. - Set up testing with Vitest for unit and end-to-end tests. - Configure Prettier and ESLint for code formatting and linting. - Create Docker Compose setup for PostgreSQL, MongoDB, and Redis services. - Establish contracts package for shared Zod schemas and TypeScript types. - Implement React frontend with device status and greeting functionalities. - Add VS Code setup documentation for onboarding developers.
37 lines
786 B
YAML
37 lines
786 B
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: app
|
|
POSTGRES_PASSWORD: app
|
|
POSTGRES_DB: app
|
|
ports:
|
|
- '5432:5432'
|
|
volumes:
|
|
- ./infra/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U app -d app']
|
|
interval: 3s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
mongo:
|
|
image: mongo:7
|
|
ports:
|
|
- '27017:27017'
|
|
healthcheck:
|
|
test: ['CMD', 'mongosh', '--quiet', '--eval', "db.adminCommand('ping').ok"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- '6379:6379'
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 3s
|
|
timeout: 5s
|
|
retries: 20
|