Created
February 17, 2022 07:21
-
-
Save bleft/3fbb7ed08983f0338b5d68968da34be5 to your computer and use it in GitHub Desktop.
Run Wordpress with MySQL in Docker - start with: docker-compose up -d
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
version: "3.8" | |
services: | |
db: | |
image: mysql:latest | |
volumes: | |
- ./db/data:/var/lib/mysql | |
ports: | |
- "3306:3306" | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: rootpass | |
MYSQL_DATABASE: database | |
MYSQL_USER: username | |
MYSQL_PASSWORD: password | |
wordpress: | |
image: wordpress:latest | |
depends_on: | |
- db | |
volumes: | |
- ./wp/wp-content:/var/www/html/wp-content | |
# Add other files or folders that you want to override here e.g. stylesheets | |
ports: | |
- "8880:80" | |
restart: always | |
environment: | |
WORDPRESS_DB_HOST: db:3306 | |
WORDPRESS_DB_NAME: database | |
WORDPRESS_DB_USER: username | |
WORDPRESS_DB_PASSWORD: password | |
WORDPRESS_TABLE_PREFIX: klex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment