Extremely Popular
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384version: '3.8'
x-database-env: &database-env POSTGRES_DB: "postgres" POSTGRES_PASSWORD: "postgres" POSTGRES_USER: "postgres"
x-test-env: &test-env WAIT_HOSTS: "postgres_clear:6000,postgres_md5:6001,postgres_scram:6002" # Wait fifteen seconds after database goes online # for database metadata initialization WAIT_AFTER_HOSTS: "15"
x-test-volumes: &test-volumes - /var/run/postgres_clear:/var/run/postgres_clear - /var/run/postgres_md5:/var/run/postgres_md5 - /var/run/postgres_scram:/var/run/postgres_scram
services: postgres_clear: # Clear authentication was removed after Postgres 9 image: postgres:9 hostname: postgres_clear environment: <<: *database-env volumes: - ./docker/postgres_clear/data/:/var/lib/postgresql/host/ - ./docker/postgres_clear/init/:/docker-entrypoint-initdb.d/ - /var/run/postgres_clear:/var/run/postgresql ports: - "6000:6000"
postgres_md5: image: postgres:14 hostname: postgres_md5 environment: <<: *database-env volumes: - ./docker/postgres_md5/data/:/var/lib/postgresql/host/ - ./docker/postgres_md5/init/:/docker-entrypoint-initdb.d/ - /var/run/postgres_md5:/var/run/postgresql ports: - "6001:6001"
postgres_scram: image: postgres:14 hostname: postgres_scram environment: <<: *database-env POSTGRES_HOST_AUTH_METHOD: "scram-sha-256" POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256" volumes: - ./docker/postgres_scram/data/:/var/lib/postgresql/host/ - ./docker/postgres_scram/init/:/docker-entrypoint-initdb.d/ - /var/run/postgres_scram:/var/run/postgresql ports: - "6002:6002"
tests: build: . # Name the image to be reused in no_check_tests image: postgres/tests command: sh -c "/wait && deno test --unstable -A --jobs" depends_on: - postgres_clear - postgres_md5 - postgres_scram environment: <<: *test-env volumes: *test-volumes
no_check_tests: image: postgres/tests command: sh -c "/wait && deno test --unstable -A --jobs --no-check" depends_on: - tests environment: <<: *test-env NO_COLOR: "true" volumes: *test-volumes