Last active
September 6, 2020 20:54
-
-
Save hsimah/7fd6b890f99cbecbae32c1636169e4e6 to your computer and use it in GitHub Desktop.
Add wp-content to docker-compose.yml for WordPress, WSL2 & Docker
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.7" | |
services: | |
wordpress: | |
container_name: www | |
build: | |
context: . | |
dockerfile: ./Dockerfile | |
links: | |
- mysql | |
env_file: | |
- .env | |
volumes: | |
- .docker/wp-content:/var/www/html/wp-content:delegated | |
- .:/var/www/html/wp-content/plugins/my-plugin:delegated | |
- 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: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment