Skip to content

Instantly share code, notes, and snippets.

@codenoid
Last active November 6, 2023 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codenoid/0d5e410fa4ca5fb63b00ed58572c1428 to your computer and use it in GitHub Desktop.
Save codenoid/0d5e410fa4ca5fb63b00ed58572c1428 to your computer and use it in GitHub Desktop.
2023 Wordpress MySQL Docker Compose
services:
db:
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4-focal
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=wpwpwproot
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wpwpwp
- MYSQL_PASSWORD=wpwpwp
expose:
- 3306
- 33060
wordpress:
image: wordpress:latest
ports:
- 80:80
restart: always
volumes:
- ./wp-content:/var/www/html/wp-content
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=wpwpwp
- WORDPRESS_DB_PASSWORD=wpwpwp
- WORDPRESS_DB_NAME=wordpress
volumes:
db_data:
file_uploads = On
memory_limit = 500M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment