Created
September 6, 2020 21:07
-
-
Save hsimah/b234639e8a9e978bc618b1bf5eac5753 to your computer and use it in GitHub Desktop.
Final docker-compose.yml for WordPress, WSL2 & Docker
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.7" | |
services: | |
wordpress: | |
container_name: www | |
build: | |
context: . | |
dockerfile: ./Dockerfile | |
links: | |
- mysql | |
env_file: | |
- .env | |
volumes: | |
- .docker/root/.bash_history:/root/.bash_history:delegated | |
- .docker/share:/root/share:delegated | |
- .docker/wp-content:/var/www/html/wp-content:delegated | |
- .:/var/www/html/wp-content/plugins/my-plugin:delegated | |
- type: volume | |
source: node_modules | |
target: /var/www/html/wp-content/plugins/my-plugin/app/node_modules | |
volume: | |
nocopy: true | |
- type: tmpfs | |
target: /var/www/html/wp-content/plugins/my-plugin/.docker | |
volume: | |
nocopy: true | |
tmpfs: | |
size: 0 | |
mysql: | |
container_name: db | |
image: mysql:5.7 | |
env_file: | |
- .env | |
volumes: | |
- database:/var/lib/mysql | |
volumes: | |
database: | |
node_modules: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment