I'm running a Wordpress site in a PHP fpm container with NGINX running in it's own container with the following (watered down) docker-compose file:
volumes:
wp:
driver: local
services:
nginx:
image: nginx:latest
restart: unless-stopped
depends_on:
- bedrock
volumes:
- wp:/var/www/html/
- ./uploads:/var/www/html/web/app/uploads
- ./vhost.conf:/etc/nginx/conf.d/default.conf
expose:
- 80
bedrock:
image: my-site:latest
restart: unless-stopped
volumes:
- ./uploads:/var/www/html/web/app/uploads
- ./.env:/var/www/html/.env
- ./php.ini:/usr/local/etc/php/conf.d/php.ini
- wp:/var/www/html/
labels:
- "com.centurylinklabs.watchtower.enable=true"
I use the wp
volume so NGINX can serve the files from the bedrock container, but whenever I make an update in the code of the bedrock site and update the image, I nee to manually remove the volume and restart it. Is there a way the NGINX container can serve the files from the bedrock container without needing to remove the volume?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745620320a4636478.html
评论列表(0条)