Last active
August 19, 2024 05:56
-
-
Save 0xAliRaza/3a24b71395c65cb8957ebe48ab21333e to your computer and use it in GitHub Desktop.
Local wordpress setup with Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; log PHP errors to a file. E_ALL=32767 | |
log_errors = on | |
error_reporting = 32767 | |
error_log = /proc/1/fd/1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
display_errors = On | |
display_startup_errors = On | |
error_reporting = E_ALL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
- wordpress_db:/var/lib/mysql | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD=somewordpress | |
- MYSQL_DATABASE=wordpress | |
- MYSQL_USER=wordpress | |
- MYSQL_PASSWORD=wordpress | |
expose: | |
- 3306 | |
- 33060 | |
wordpress: | |
image: wordpress:latest | |
volumes: | |
- ./wp-data:/var/www/html | |
- ./logging.ini:/usr/local/etc/php/conf.d/logging.ini | |
- ./php.ini:/usr/local/php/php.ini | |
- ./php.ini:/usr/local/etc/php/php.ini | |
ports: | |
- 8080:80 | |
restart: always | |
environment: | |
- WORDPRESS_DB_HOST=db | |
- WORDPRESS_DB_USER=wordpress | |
- WORDPRESS_DB_PASSWORD=wordpress | |
- WORDPRESS_DB_NAME=wordpress | |
volumes: | |
wordpress_db: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment