name: immich-e2e

services:
  immich-server:
    container_name: immich-e2e-server
    command: ['./start.sh']
    image: immich-server:latest
    build:
      context: ../
      dockerfile: server/Dockerfile
      args:
        - BUILD_ID=1234567890
        - BUILD_IMAGE=e2e
        - BUILD_SOURCE_REF=e2e
        - BUILD_SOURCE_COMMIT=e2eeeeeeeeeeeeeeeeee
    environment:
      - DB_HOSTNAME=database
      - DB_USERNAME=postgres
      - DB_PASSWORD=postgres
      - DB_DATABASE_NAME=immich
      - IMMICH_MACHINE_LEARNING_ENABLED=false
      - IMMICH_TELEMETRY_INCLUDE=all
      - IMMICH_ENV=testing
      - IMMICH_PORT=2285
      - IMMICH_IGNORE_MOUNT_CHECK_ERRORS=true
    volumes:
      - ./test-assets:/test-assets
    extra_hosts:
      - 'auth-server:host-gateway'
    depends_on:
      - database
    ports:
      - 2285:2285

  database:
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52
    command: -c fsync=off -c shared_preload_libraries=vectors.so
    environment:
      POSTGRES_PASSWORD: postgres
      POSTGRES_USER: postgres
      POSTGRES_DB: immich
    ports:
      - 5435:5432