What finally worked for me.
Installed postgresql:15 through apps.
configured the Postgresql
password=odoouser
user=odoo
DB=db
set Datastorage path to be "/mnt/cache/appdata/postgresql/"
Used the docker compose plugin. Add New stack - Advanced - set the location to /mnt/user/appdata/odoo
Edit Stack - Compose file
version: '2'
services:
odoo:
image: odoo:16.0
user: root
ports:
- "8069:8069"
- "8072:8072"
tty: true
command: --
volumes:
- /mnt/user/appdata/odoo/data:/var/lib/odoo:rw
- /mnt/user/appdata/odoo/config:/etc/odoo:rw
- /mnt/user/appdata/odoo/addons:/mnt/extra-addons:rw
environment:
- HOST=[Server IP address for postgresql here]
- PORT=5432
- USER=odoo
- PASSWORD=odoouser
That got it to install correctly .
I did at this point change the /mnt/user/appdata/odoo folder owner to root - I am not sure if this was needed
However......
then goto /mnt/user/appdata/odoo/config
edit odoo.conf
add the lines
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo
Restart Odoo and you should see a Filestore folder created inside the data directory which should give persistent data working nicely. I moved an existing database onto this system from a bare metal setup and so far all seems good
The three things on a lot of attempted setups that I missed were:-
Getting the volume mappings correct - never used Docker before - I am wondering for speed whether the Data store should be mapped to "cache" opposed to "user".
not having user:root - it would not install before that
editing the odoo.conf file to give the mappings within odoo