compose.yaml 838 B

12345678910111213141516171819202122232425262728293031323334
  1. services:
  2. db:
  3. # We use a mariadb image which supports both amd64 & arm64 architecture
  4. image: mariadb:11.8
  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. - MARIADB_AUTO_UPGRADE=1
  13. - MYSQL_ROOT_PASSWORD=somewordpress
  14. - MYSQL_DATABASE=wordpress
  15. - MYSQL_USER=wordpress
  16. - MYSQL_PASSWORD=wordpress
  17. expose:
  18. - 3306
  19. - 33060
  20. wordpress:
  21. image: wordpress:latest
  22. ports:
  23. - 80:80
  24. restart: always
  25. environment:
  26. - WORDPRESS_DB_HOST=db
  27. - WORDPRESS_DB_USER=wordpress
  28. - WORDPRESS_DB_PASSWORD=wordpress
  29. - WORDPRESS_DB_NAME=wordpress
  30. volumes:
  31. db_data: