Add a named volume for backend build artifacts to prevent root-owned files created inside the container from blocking host Gradle builds. This follows the same pattern as the existing backend-gradle-project volume. Configure OpenCode with LSP, formatter, auto-compaction, and file watcher settings for improved development experience. Changes: - docker-compose.yml: add backend-build:/app/backend/build volume - opencode.json: enable lsp, formatter, auto-compaction, prune, and file watcher with ignore patterns for node_modules, .git, dist, build
62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
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
|
|
|
|
backend:
|
|
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}
|
|
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
|
|
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
|
|
STRIPE_PRICE_ID: ${STRIPE_PRICE_ID}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
volumes:
|
|
- .:/app
|
|
- backend-gradle-project:/app/.gradle
|
|
- backend-build:/app/backend/build
|
|
- gradle-cache:/root/.gradle
|
|
|
|
frontend:
|
|
build:
|
|
dockerfile: docker/frontend.Dockerfile
|
|
context: .
|
|
container_name: bilhej-frontend
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- backend
|
|
volumes:
|
|
- ./frontend/src:/app/src
|
|
- ./frontend/public:/app/public
|
|
- ./frontend/index.html:/app/index.html
|
|
|
|
volumes:
|
|
pgdata:
|
|
gradle-cache:
|
|
backend-gradle-project:
|
|
backend-build:
|