docker-compose.yaml 654 B

1234567891011121314151617181920212223242526272829303132333435
  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_ROOT_HOST: "%"
  26. MYSQL_DATABASE: "test"
  27. MYSQL_USER: "test"
  28. MYSQL_PASSWORD: "test"
  29. MYSQL_ROOT_PASSWORD: "test"
  30. MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
  31. networks:
  32. frontend:
  33. backend: