docker-compose.fragment.sh 561 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/sh
  2. if [ "${DBMS}" = 'postgres' ]; then
  3. cat <<EOF
  4. db:
  5. image: postgres:alpine
  6. restart: always
  7. tty: false
  8. ports:
  9. - 5432:5432
  10. environment:
  11. - PGDATA=/var/lib/postgres/data
  12. env_file:
  13. - ./docker/db/db.env
  14. volumes:
  15. - database:/var/lib/postgres/data
  16. EOF
  17. else
  18. cat <<EOF
  19. db:
  20. image: mariadb
  21. restart: always
  22. tty: false
  23. ports:
  24. - 3306:3306
  25. env_file:
  26. - ./docker/db/db.env
  27. EOF
  28. fi