docker-compose.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. services:
  2. caddy:
  3. container_name: caddy
  4. image: caddy
  5. restart: unless-stopped
  6. ports:
  7. - "80:80"
  8. - "443:443"
  9. volumes:
  10. - ./Caddyfile:/etc/caddy/Caddyfile
  11. - ./src:/app/public
  12. networks:
  13. - internal
  14. depends_on:
  15. - php-fpm
  16. php-fpm:
  17. user: 1000:1000
  18. container_name: php-fpm
  19. build:
  20. dockerfile: ./Docker/php/Dockerfile
  21. restart: unless-stopped
  22. extra_hosts:
  23. - host.docker.internal:host-gateway # pour xdebug
  24. volumes:
  25. - ./src:/app/public
  26. networks:
  27. - internal
  28. - redis
  29. mariadb:
  30. container_name: mariadb
  31. build:
  32. dockerfile: ./Docker/mariadb/Dockerfile
  33. environment:
  34. - MYSQL_ROOT_PASSWORD=password
  35. - MYSQL_DATABASE=wordpress
  36. volumes:
  37. - ./data:/var/lib/mysql
  38. networks:
  39. - internal
  40. redis:
  41. user: 1000:1000
  42. container_name: redis
  43. build:
  44. dockerfile: ./Docker/redis/Dockerfile
  45. command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
  46. ports:
  47. - "6379:6379"
  48. restart: always
  49. networks:
  50. - redis
  51. phpmyadmin:
  52. container_name: phpmyadmin
  53. image: phpmyadmin/phpmyadmin
  54. ports:
  55. - 8080:80
  56. networks:
  57. - internal
  58. environment:
  59. PMA_HOST: mariadb
  60. PMA_PORT: 3306
  61. PMA_USER: root
  62. PMA_PASSWORD: password
  63. depends_on:
  64. - mariadb
  65. networks:
  66. internal:
  67. driver: bridge
  68. redis: