docker-compose.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. networks:
  2. dev:
  3. services:
  4. web:
  5. networks:
  6. - dev
  7. environment:
  8. - APACHE_RUN_USER=#1000
  9. build:
  10. context: .
  11. dockerfile: Dockerfile
  12. ports:
  13. - 80:80
  14. - 5173:5173
  15. - 9003:9003
  16. volumes:
  17. - ./config/phpconfig/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
  18. - ./config/phpconfig/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
  19. - ./config/phpconfig/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini
  20. - ./config/phpconfig/php.ini:/usr/local/etc/php/php.ini
  21. - ./config/web/default.conf:/etc/apache2/sites-enabled/000-default.conf
  22. - /var/www/html/vendor/
  23. restart: unless-stopped
  24. # Overrides default command so things don't shut down after the process ends.
  25. command: sleep infinity
  26. database:
  27. networks:
  28. - dev
  29. image: mariadb:10.6
  30. restart: always
  31. ports:
  32. - 3306:3306
  33. environment:
  34. MYSQL_ROOT_PASSWORD: 123
  35. MYSQL_USER: root
  36. MYSQL_PASSWORD: 123
  37. volumes:
  38. - mariadb-data:/var/lib/mysql #If you are going to be using the same database data across local servers/projects, change ./docker/database to a location
  39. #outside of this server tree and then set this volume path in the docker-compose.yml for each server.
  40. phpmyadmin:
  41. networks:
  42. - dev
  43. image: phpmyadmin
  44. depends_on:
  45. - database
  46. links:
  47. - database
  48. environment:
  49. PMA_HOST: database
  50. PMA_PORT: 3306
  51. MYSQL_ROOT_PASSWORD: 123
  52. PMA_ARBITRARY: 1
  53. ports:
  54. - 8000:80
  55. - 4430:443
  56. volumes:
  57. - /sessions
  58. volumes:
  59. mariadb-data: