Shared infrastructure for Specvital project - local development environment and database schema management.
- Open this folder in VS Code
- Click "Reopen in Container" when prompted
- PostgreSQL and Redis start automatically
cd .devcontainer && docker compose up -d| Service | Port | Container Name |
|---|---|---|
| PostgreSQL | 5432 | specvital-postgres |
| Redis | 6379 | specvital-redis |
just --list # View all commands
just deps # Install dependencies
just migrate # Apply DB migrations
just reset # Reset DB (wipe + migrate)
just makemigration name # Create new migration
just lint all # Format all filesspecvital/
βββ infra # This repo - start first!
βββ collector # Go Worker
βββ web # NestJS + Next.js
Workflow: Open infra devcontainer first β then open other repos
Add to .devcontainer/docker-compose.yml:
networks:
specvital-network:
name: specvital-network
external: trueEnvironment variables:
DATABASE_URL=postgres://postgres:postgres@specvital-postgres:5432/specvital?sslmode=disable
REDIS_URL=redis://specvital-redis:6379
Database schema is managed with Atlas.
| Path | Description |
|---|---|
db/schema/schema.hcl |
Declarative schema |
db/schema/migrations |
Timestamped SQL files |
db/atlas.hcl |
Environment configs |
Network not found: Start infra devcontainer first, or run docker network create specvital-network
Port conflict: docker ps | grep -E "5432|6379" β stop conflicting container