docker-compose.yml 793 B

123456789101112131415161718192021222324252627282930313233343536
  1. version: '3.8'
  2. services:
  3. php-apache-environment:
  4. container_name: php-apache-ci
  5. build:
  6. context: ./php
  7. dockerfile: Dockerfile
  8. depends_on:
  9. - db
  10. volumes:
  11. - ./php/src:/var/www/html/
  12. - ./php-docker/php.ini:/usr/local/etc/php/php.ini
  13. ports:
  14. - 7700:80
  15. db:
  16. container_name: db-ci
  17. # image: mysql:5.7
  18. image: mariadb:10.5
  19. restart: always
  20. environment:
  21. MYSQL_ROOT_PASSWORD: MYSQL_ROOT_PASSWORD
  22. MYSQL_DATABASE: MY_DATABASE
  23. MYSQL_USER: MYSQL_USER
  24. MYSQL_PASSWORD: MYSQL_PASSWORD
  25. ports:
  26. - 3310:3306
  27. phpmyadmin:
  28. container_name: phpmyadmin-ci
  29. image: phpmyadmin/phpmyadmin
  30. ports:
  31. - '8080:80'
  32. restart: always
  33. environment:
  34. PMA_HOST: db
  35. depends_on:
  36. - db