- Add full database schema with accounts, dishes, ingredients, categories, and pricing - Implement custom types for weight, currency, recipe difficulty, and color hex - Add soft delete pattern with deleted_at and active views for all tables - Include journaling triggers for created_at/updated_at automation feat: add SQLC configuration with proper type overrides - Configure SQLC to use UUID, decimal, and timestamptz types with proper Go mappings - Add github.com/shopspring/decimal dependency for precise decimal handling - Set up proper pointer handling for nullable fields in generated structs refactor: replace simple food_items with full dish management system - Remove old FoodItem model and replace with comprehensive Dish model - Implement dish creation and retrieval queries with full field support - Add ingredient management with weight/amount tracking chore: update infrastructure dependencies - Switch to custom PostgreSQL image with pg_idkit extension for UUIDv7 support - Add DATABASE_URI environment variable configuration - Update Docker Compose configuration for new database image chore: organize SQL with fold markers and section comments - Add vim fold markers for better code navigation - Structure schema into clear sections: extensions, types, tables, triggers - Separate query files with organized comment blocks
42 lines
1003 B
YAML
42 lines
1003 B
YAML
services:
|
|
backend:
|
|
build: ./backend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "/usr/bin/curl", "-f", "http://localhost:8080/api/service/health"]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
ports:
|
|
- "8080:8080"
|
|
networks:
|
|
- app-network
|
|
|
|
postgres:
|
|
image: ghcr.io/vadosware/pg_idkit:0.4.0-pg18.0-alpine3.22.2-amd64
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready", "-q", "-d", "${POSTGRES_DB}", "-U", "${POSTGRES_USER}" ]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- app-network
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
- ./sqlc/schema.sql:/docker-entrypoint-initdb.d/init.sql
|
|
|
|
volumes:
|
|
postgres-data:
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|