compose.yaml 727 B

123456789101112131415161718192021
  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. volumes:
  12. - database_data:/var/lib/postgresql/data:rw
  13. # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
  14. # - ./docker/db/data:/var/lib/postgresql/data:rw
  15. ###< doctrine/doctrine-bundle ###
  16. volumes:
  17. ###> doctrine/doctrine-bundle ###
  18. database_data:
  19. ###< doctrine/doctrine-bundle ###