Docker upgrade question

Following the github instructions, I create the containers with

git clone https://github.com/frappe/frappe_docker
cd frappe_docker
docker compose -f pwd.yml up -d

But what is the proper way to upgrade the containers?

What I know is:

  1. git pull
  2. stop the ERPNext application, that will stop all containers
  3. run docker container prune to delete all stopped containers
  4. run the docker compose to recreate the containers

But how about volume? I didn’t create the site manually.
Based on this information https://github.com/frappe/frappe_docker/blob/main/docs/site-operations.md

Should I run the migrate like this?

docker-compose exec backend bench migrate

You have to create a volume separately with

‘docker volume create ’ and when configuring with compose yml you have to add ‘external: true’ in volume

There are volumes created by the pwd.yml, I think I don’t need to create the volumes by myself.

I am referring this thread
Docker ERPNext update

I am new to ERPNext, I guess there is a default site create by the pwd.yml. But what is the name of the site?

Back to my original question, is that I need to run the following command everytime I pull a new image?

docker-compose exec backend bench migrate

site is named - frontend

Yes. The command is

bench --site all migrate

“all” is a keyword to migrate all sites, or you specify the site name: bench --site frontend migrate

1 Like