Last active
March 3, 2023 09:35
-
-
Save xescuder/5c21714fa6c125d58ab43e9377a0cf17 to your computer and use it in GitHub Desktop.
Wordpress Docker Compose
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
version: "3" | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- ./wp-data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: MyR00tMySQLPa$$w0rD | |
MYSQL_DATABASE: MyWordPressDatabaseName | |
MYSQL_USER: MyWordPressUser | |
MYSQL_PASSWORD: Pa$$w0rD | |
wordpress: | |
depends_on: | |
- db | |
build: | |
context: . | |
dockerfile: Dockerfile-php | |
image: wordpress:latest | |
volumes: | |
- ./wp-app:/var/www/html | |
restart: always | |
ports: | |
- "8000:80" | |
environment: | |
WORDPRESS_DB_HOST: db:3306 | |
WORDPRESS_DB_USER: MyWordPressUser | |
WORDPRESS_DB_PASSWORD: Pa$$w0rD | |
WORDPRESS_DB_NAME: MyWordPressDatabaseName | |
UPLOAD_LIMIT: 64M | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin:latest | |
restart: always | |
environment: | |
PMA_HOST: db | |
PMA_USER: MyWordPressUser | |
PMA_PASSWORD: Pa$$5w0rD | |
ports: | |
- "8080:80" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment