docker-compose.yaml 815 B

123456789101112131415161718192021222324252627282930313233
  1. services:
  2. db:
  3. # We use a mariadb image which supports both amd64 & arm64 architecture
  4. image: mariadb:10.6.4-focal
  5. # If you really want to use MySQL, uncomment the following line
  6. #image: mysql:8.0.27
  7. command: '--default-authentication-plugin=mysql_native_password'
  8. volumes:
  9. - db_data:/var/lib/mysql
  10. restart: always
  11. environment:
  12. - MYSQL_ROOT_PASSWORD=somewordpress
  13. - MYSQL_DATABASE=wordpress
  14. - MYSQL_USER=wordpress
  15. - MYSQL_PASSWORD=wordpress
  16. expose:
  17. - 3306
  18. - 33060
  19. wordpress:
  20. image: wordpress:latest
  21. ports:
  22. - 80:80
  23. restart: always
  24. environment:
  25. - WORDPRESS_DB_HOST=db
  26. - WORDPRESS_DB_USER=wordpress
  27. - WORDPRESS_DB_PASSWORD=wordpress
  28. - WORDPRESS_DB_NAME=wordpress
  29. volumes:
  30. db_data: