Created
April 15, 2024 12:08
-
-
Save ricardoalcantara/51fe34112e6d11a98c9a74804d7f03da to your computer and use it in GitHub Desktop.
Wordpress Docker Composer
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: | |
wordpress: | |
image: wordpress | |
restart: always | |
ports: | |
- "8000:80" | |
environment: | |
WORDPRESS_DB_HOST: db | |
WORDPRESS_DB_USER: example_user | |
WORDPRESS_DB_PASSWORD: example_password | |
WORDPRESS_DB_NAME: example_db | |
volumes: | |
- wordpress_data:/var/www/html | |
depends_on: | |
- db | |
db: | |
image: mysql:8 | |
restart: always | |
environment: | |
MYSQL_DATABASE: example_db | |
MYSQL_USER: example_user | |
MYSQL_PASSWORD: example_password | |
MYSQL_RANDOM_ROOT_PASSWORD: '1' | |
volumes: | |
- db_data:/var/lib/mysql | |
volumes: | |
wordpress_data: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment