version: "3.9" # Local development stack: `docker compose up --build`. # The database tests use a separate minstrel_test database, so they never # truncate your dev data. Run them with `make test-integration`. services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: minstrel POSTGRES_PASSWORD: minstrel POSTGRES_DB: minstrel networks: - minstrel # ports: # - "5432:5432" volumes: - minstrel-pgdata:/var/lib/postgresql/data # Creates minstrel_test on a fresh volume. On an existing volume, # make test-integration creates it instead. - ./deploy/initdb:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U minstrel -d minstrel"] interval: 5s timeout: 5s retries: 10 minstrel: build: . depends_on: postgres: condition: service_healthy environment: MINSTREL_DATABASE_URL: postgres://minstrel:minstrel@postgres:5432/minstrel?sslmode=disable MINSTREL_LOG_FORMAT: text MINSTREL_LIBRARY_SCAN_PATHS: /music MINSTREL_LIBRARY_SCAN_ON_STARTUP: "true" MINSTREL_STORAGE_DATA_DIR: /app/data networks: - minstrel ports: - "4533:4533" volumes: # Your test library, read-only so a scanner bug can't change your files. - /mnt/Media/Music:/music:ro # Artwork and caches, kept across container recreates. - minstrel-data:/app/data volumes: minstrel-pgdata: minstrel-data: networks: minstrel: