docker-compose.yaml 627 B

12345678910111213141516171819202122232425262728293031323334
  1. version: '3.3'
  2. services:
  3. web:
  4. image: richarvey/nginx-php-fpm:1.5.0
  5. ports:
  6. - "80:80"
  7. networks:
  8. - frontend
  9. - backend
  10. restart: always
  11. volumes:
  12. - "./src/:/var/www/html/"
  13. depends_on:
  14. - database
  15. database:
  16. image: mysql:5.7
  17. volumes:
  18. - "./db/:/docker-entrypoint-initdb.d"
  19. restart: always
  20. ports:
  21. - "3306:3306"
  22. networks:
  23. - backend
  24. environment:
  25. MYSQL_DATABASE: "test"
  26. MYSQL_USER: "test"
  27. MYSQL_PASSWORD: "test"
  28. MYSQL_ROOT_PASSWORD: "root"
  29. MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
  30. networks:
  31. frontend:
  32. backend: