You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
897 B

5 months ago
  1. version: '3'
  2. services:
  3. ###> doctrine/doctrine-bundle ###
  4. database:
  5. image: postgres:${POSTGRES_VERSION:-16}-alpine
  6. environment:
  7. POSTGRES_DB: ${POSTGRES_DB:-app}
  8. # You should definitely change the password in production
  9. POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
  10. POSTGRES_USER: ${POSTGRES_USER:-app}
  11. healthcheck:
  12. test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"]
  13. timeout: 5s
  14. retries: 5
  15. start_period: 60s
  16. volumes:
  17. - database_data:/var/lib/postgresql/data:rw
  18. # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
  19. # - ./docker/db/data:/var/lib/postgresql/data:rw
  20. ###< doctrine/doctrine-bundle ###
  21. volumes:
  22. ###> doctrine/doctrine-bundle ###
  23. database_data:
  24. ###< doctrine/doctrine-bundle ###