Created
June 10, 2024 07:55
-
-
Save psahni/122bd4b5192d95bc455a95b37b81fede to your computer and use it in GitHub Desktop.
docker-compose-example-wp-mysql
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: | |
container_name: wp-mysql | |
image: mysql:5.7 | |
volumes: | |
- $PWD/data:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: 12345678 | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
ports: | |
- "3306:3306" | |
networks: | |
- my_net | |
wp: | |
container_name: wp-web | |
volumes: | |
- "$PWD/html:/var/www/html" | |
depends_on: | |
- db | |
image: wordpress | |
ports: | |
- "9091:80" | |
environment: | |
WORDPRESS_DB_HOST: db:3306 | |
WORDPRESS_DB_USER: wordpress | |
WORDPRESS_DB_PASSWORD: wordpress | |
networks: | |
- my_net | |
networks: | |
my_net: |
Author
psahni
commented
Jun 10, 2024
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment