docker-compose.yml 498 B

12345678910111213141516
  1. services:
  2. db:
  3. build: .
  4. ports:
  5. - ${PG_TEST_PORT:-5432}:5432
  6. volumes:
  7. - .:/docker-entrypoint-initdb.d
  8. environment:
  9. POSTGRES_PASSWORD: postgres
  10. command: postgres -c config_file=/etc/postgresql/postgresql.conf -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
  11. healthcheck:
  12. test: ["CMD-SHELL", "pg_isready -U postgres"]
  13. interval: 1s
  14. timeout: 2s
  15. retries: 10
  16. start_period: 2s