-1

I've set up Odoo 15 on a container with docker compose, and am accessing the container through remote container extension on VS code, I've looked everywhere I can't seem to get how to access the odoo files such as the installed add-ons folder

I've set up my volumes in docker-compose file pretty much in this way:

 version: '3'
     services: 
      odoo:   
          image: odoo:15.0   
          env_file: .env   
          depends_on:
               - postgres   
          ports:   
               - "127.0.0.1:8069:8069"   
          volumes:     
              - data:/var/lib/odoo     
               - ./config:/etc/odoo     
              - ./extra-addons:/mnt/extra-addons

But since I would like to apply changes on the html/css of non custom add-ons that are already present in odoo I'd have to access the source code of odoo that is present in the container (if doable).

For example in the volume odoo-addons:/mnt/extra-addons would be a directory where i could add my custom module but what i want is to find the source code of the add-ons already present in Odoo ?!

m19v
  • 1,800
  • 4
  • 11
  • 26

1 Answers1

0

Use named volumes - it will copy the existing data from the container image into a new volume. In docker-compose you can do it, by defining a volume:

version: '2'

volumes:
  data:
  
services:
 odoo:
  image: odoo:15.0
  env_file: .env
  depends_on: 
   - postgres
  ports:
   - "127.0.0.1:8069:8069"
  volumes:
   - data:/var/lib/odoo
   - ./config:/etc/odoo
   - ./extra-addons:/mnt/extra-addons

If your files reside in the /var/lib/odoo folder you will be able to view/edit the files which are thereby accessing them in the /var/lib/docker/volumes/{someName}_data/_data

Kenly
  • 24,317
  • 7
  • 44
  • 60
IamK
  • 2,753
  • 5
  • 30
  • 39