89 lines
2.1 KiB
YAML
89 lines
2.1 KiB
YAML
##
|
|
## Standalone dev stack — lokaal bouwen en testen
|
|
##
|
|
## docker compose -f docker-compose.dev.yml up --build
|
|
##
|
|
|
|
services:
|
|
|
|
postgres:
|
|
image: postgres:18-alpine
|
|
container_name: vibefinance-postgres-dev
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-vibefinance}
|
|
POSTGRES_USER: ${POSTGRES_USER:-vibefinance}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
|
|
volumes:
|
|
- postgres_dev_data:/var/lib/postgresql
|
|
networks:
|
|
- dev
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U vibefinance"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: development
|
|
args:
|
|
VITE_APP_VERSION: ${VITE_APP_VERSION:-dev}
|
|
image: vibefinance/frontend:${VERSION:-latest-dev}
|
|
container_name: vibefinance-frontend-dev
|
|
ports:
|
|
- "80:5173"
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
networks:
|
|
- dev
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:5173/"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
target: development
|
|
image: vibefinance/backend:${VERSION:-latest-dev}
|
|
container_name: vibefinance-backend-dev
|
|
expose:
|
|
- "3001"
|
|
volumes:
|
|
- ./backend:/app
|
|
- /app/node_modules
|
|
environment:
|
|
NODE_ENV: development
|
|
PORT: 3001
|
|
JWT_SECRET: dev-secret-change-in-production
|
|
JWT_EXPIRES: 7d
|
|
CORS_ORIGIN: http://localhost
|
|
DATABASE_URL: postgresql://${POSTGRES_USER:-vibefinance}:${POSTGRES_PASSWORD:-devpassword}@postgres:5432/${POSTGRES_DB:-vibefinance}
|
|
networks:
|
|
- dev
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/health"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 15s
|
|
|
|
volumes:
|
|
postgres_dev_data:
|
|
|
|
networks:
|
|
dev:
|
|
driver: bridge
|