# Bindless dev stack — standalone variant of docker-compose.yml. # # Why this exists as a standalone file (not an override): # Docker Compose merges `volumes:` by list concatenation, not by entry # replacement, so an override can't drop the bind mounts from the base file — # only append to them. A standalone file lets us redefine services with only # the volumes we want. # # Usage: # docker compose -f docker-compose.dev-bindless.yml up -d --build # # Use this when the Docker daemon can't bind-mount the host repo correctly: # - Docker-in-Docker setups (e.g. this Hermes sandbox) # - rootless Docker with restricted mount paths # - Some CI runners # # For normal local dev, use docker-compose.yml — it bind-mounts the repo for # Vite HMR and gradle bootRun hot reload. # # Trade-off vs. the bind-mounted dev compose: # - The image is "frozen" at build time. Editing source on the host does not # affect the running container. Edit + rebuild + restart, or run # `docker compose up -d --build` after changes. # - All source lives inside the image (docker/backend.Dockerfile and # docker/frontend.Dockerfile COPY it in at build time). # # What you still get: # - Gradle caches in named volumes (.gradle, backend/build, gradle-cache) # so dependency downloads persist between `up` cycles. # - Postgres data persists across `down` (via the pgdata volume). services: postgres: image: postgres:16 container_name: bilhej-postgres ports: - "5432:5432" environment: POSTGRES_DB: ${POSTGRES_DB} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 5s timeout: 5s retries: 5 mailpit: image: ghcr.io/axllent/mailpit:v1.28 container_name: bilhej-mailpit ports: - "1025:1025" - "8025:8025" backend: image: bilhej-backend-dev build: dockerfile: docker/backend.Dockerfile context: . container_name: bilhej-backend ports: - "8080:8080" environment: SPRING_PROFILES_ACTIVE: docker POSTGRES_DB: ${POSTGRES_DB} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} JWT_SECRET: ${JWT_SECRET} SWISH_NUMBER: ${SWISH_NUMBER} STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY} STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET} STRIPE_PRICE_ID: ${STRIPE_PRICE_ID} APP_PUBLIC_BASE_URL: ${APP_PUBLIC_BASE_URL:-http://localhost:3000} MAIL_HOST: mailpit MAIL_PORT: "1025" MAIL_USERNAME: "" MAIL_PASSWORD: "" MAIL_FROM: ${MAIL_FROM:-noreply@bilhej.se} depends_on: postgres: condition: service_healthy mailpit: condition: service_started volumes: - backend-gradle-project:/app/.gradle - backend-build:/app/backend/build - gradle-cache:/root/.gradle frontend: image: bilhej-frontend-dev build: dockerfile: docker/frontend.Dockerfile context: . container_name: bilhej-frontend ports: - "3000:3000" depends_on: - backend volumes: pgdata: gradle-cache: backend-gradle-project: backend-build: