I’m playing with docker-compose for a test Flask app. My docker-compose.yml looks like this:
version: '2'
services:
www:
build: www/.
ports:
- "5000:5000"
volumes:
- ./www:/opt/www
links:
- db
depends_on:
- db
db:
build: db/.
volumes:
- ./database:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: supersecure
I noticed any change I made in my files within my templates folder did not take effect when I reloaded the browser locally at localhost:5000
So, I found that I can just restart the ‘www’ service defined on my docker-compose.yml file using this simple command:
docker-compose restart www
I’m not sure if this is the recommended way, but its working for now. If you have any suggestions please leave them on the comments area below.