admin管理员组文章数量:1025227
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?
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?
本文标签: Update Docker volume when image is updatedStack Overflow
版权声明:本文标题:Update Docker volume when image is updated - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745620319a2159533.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论