-
-
Save libkazz/3c9ca945ccc5aa46238b8528e5ff79de 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
WORDPRESS_DB_NAME=wordpress | |
WORDPRESS_DB_USER={input user name} | |
WORDPRESS_DB_PASSWORD={input password} | |
MYSQL_RANDOM_ROOT_PASSWORD=yes | |
MYSQL_DATABASE=wordpress | |
MYSQL_USER={input user name} | |
MYSQL_PASSWORD={input password} |
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: '2' | |
services: | |
db: | |
image: mysql:5.7 | |
container_name: "wp-test-1-db" | |
volumes: | |
- db_data:/var/lib/mysql | |
env_file: .env | |
wordpress: | |
image: wordpress:latest | |
container_name: "wp-test-1-ap" | |
depends_on: | |
- db | |
ports: | |
- "8000:80" | |
environment: | |
WORDPRESS_DB_HOST: db:3306 | |
volumes: | |
- "$PWD/html:/var/www/html" | |
- "$PWD/.docker/backup:/tmp/backup" | |
- "$PWD/.docker/log:/tmp/log" | |
env_file: .env | |
volumes: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment