Last active
October 7, 2023 23:36
-
-
Save KEINOS/a821517a85992fe329489db2ce32bd56 to your computer and use it in GitHub Desktop.
Docker-compose file for WordPress 5.5 + PHP 7.4.9, Apache 2.4.38 on the fly.
This file contains 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
# docker-compose.yml for WordPress 5.5 + PHP 7.4.9, Apache 2.4.38 | |
# | |
# - Download URL: https://git.io/JJ5Vu | |
# - How to run servers: | |
# $ php -r 'copy("https://git.io/JJ5Vu", "./docker-compose.yml");' | |
# $ docker-compose up -d | |
# - How to access: | |
# - Open browser: http://localhost:8989/ | |
# - Ref: https://www.youtube.com/watch?v=pYhLEV-sRpY @ Youtube | |
version: '3' | |
services: | |
# Database | |
db: | |
image: mysql:8.0.21 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
networks: | |
- wpsite | |
# WordPress | |
wordpress: | |
depends_on: | |
- db | |
# WP 5.5.0, PHP 7.4.9, Apache 2.4.38 | |
image: wordpress:5.5.0-php7.4-apache | |
ports: | |
- '8989:80' | |
restart: always | |
volumes: ['./wordpress:/var/www/html'] | |
environment: | |
WORDPRESS_DB_HOST: db:3306 | |
WORDPRESS_DB_USER: wordpress | |
WORDPRESS_DB_PASSWORD: wordpress | |
networks: | |
- wpsite | |
networks: | |
wpsite: | |
volumes: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment